You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.9 KiB
Dart
55 lines
1.9 KiB
Dart
import 'package:doctor_app_flutter/routes.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import '../../config/size_config.dart';
|
|
import '../../presentation/doctor_app_icons.dart';
|
|
import '../../widgets/shared/app_drawer_widget.dart';
|
|
import '../../widgets/shared/app_loader_widget.dart';
|
|
import '../../widgets/shared/custom_shape_clipper.dart';
|
|
|
|
class AppScaffold extends StatelessWidget {
|
|
String appBarTitle;
|
|
Widget body;
|
|
bool isLoading;
|
|
|
|
AppScaffold({this.appBarTitle ='', this.body, this.isLoading = false});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Hexcolor('#F5F5F5'),
|
|
appBar: appBarTitle != ''
|
|
? AppBar(
|
|
elevation: 0,
|
|
backgroundColor: Hexcolor('#515B5D'),
|
|
textTheme: TextTheme(
|
|
headline6: TextStyle(
|
|
color: Colors.white, fontWeight: FontWeight.bold)),
|
|
title: Text(appBarTitle.toUpperCase()),
|
|
leading: Builder(builder: (BuildContext context) {
|
|
return IconButton(
|
|
icon: Icon(Icons.arrow_back_ios),
|
|
color: Colors.white, //Colors.black,
|
|
onPressed: () => Navigator.pop(context),
|
|
);
|
|
}),
|
|
centerTitle: true,
|
|
actions: <Widget>[
|
|
IconButton(
|
|
icon: Icon(DoctorApp.home_icon_active),
|
|
color: Colors.white, //Colors.black,
|
|
onPressed: () => Navigator.popAndPushNamed(context, HOME),
|
|
),
|
|
],
|
|
)
|
|
: null,
|
|
body: Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]));
|
|
}
|
|
|
|
Widget buildAppLoaderWidget(bool isloading) {
|
|
return isloading ? AppLoaderWidget() : Container();
|
|
}
|
|
}
|