mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-14 17:25:47 +00:00
switched the safe area to be in the scaffold
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
@ -9,11 +8,18 @@ import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
||||
|
||||
class DefaultScaffold extends StatelessWidget {
|
||||
const DefaultScaffold(
|
||||
{super.key, required this.child, this.title, this.actions});
|
||||
{super.key,
|
||||
required this.child,
|
||||
this.title,
|
||||
this.actions,
|
||||
this.appBar,
|
||||
this.bottomNavBar});
|
||||
|
||||
final Widget child;
|
||||
final String? title;
|
||||
final List<Widget>? actions;
|
||||
final PreferredSizeWidget? appBar;
|
||||
final Widget? bottomNavBar;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnnotatedRegion(
|
||||
@ -26,20 +32,22 @@ class DefaultScaffold extends StatelessWidget {
|
||||
backgroundColor: ColorsManager.backgroundColor,
|
||||
extendBodyBehindAppBar: true,
|
||||
extendBody: true,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
centerTitle: true,
|
||||
title: BodyLarge(
|
||||
text: title ?? "",
|
||||
fontColor: ColorsManager.primaryColor,
|
||||
fontWeight: FontsManager.bold,
|
||||
),
|
||||
actions: actions,
|
||||
),
|
||||
appBar: appBar ??
|
||||
AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
centerTitle: true,
|
||||
title: BodyLarge(
|
||||
text: title ?? "",
|
||||
fontColor: ColorsManager.primaryColor,
|
||||
fontWeight: FontsManager.bold,
|
||||
),
|
||||
actions: actions,
|
||||
),
|
||||
body: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
padding: const EdgeInsets.all(Constants.defaultPadding),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: Constants.defaultPadding),
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
@ -51,6 +59,7 @@ class DefaultScaffold extends StatelessWidget {
|
||||
),
|
||||
child: SafeArea(child: child),
|
||||
),
|
||||
bottomNavigationBar: bottomNavBar,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user