diff --git a/lib/main.dart b/lib/main.dart index 180875fe..6953f636 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -27,7 +27,6 @@ class MyApp extends StatelessWidget { child: MaterialApp( title: 'Flutter Demo', theme: ThemeData( - canvasColor: Colors.transparent, primarySwatch: Colors.blue, primaryColor: Hexcolor('#B8382C'), buttonColor: Hexcolor('#B8382C'), diff --git a/lib/routes.dart b/lib/routes.dart index 7dbcca3f..82771ae6 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -28,7 +28,7 @@ const String MEDICINE_SEARCH = 'medicine-search'; const String SETTINGS = 'settings'; var routes = { - HOME: (_) => DashboardPage(title: 'Home',), + HOME: (_) => DashboardScreen(), INIT_ROUTE: (_) => Loginsreen(), MY_SCHEDULE: (_) => MyScheduleScreen(), PATIENT_SEARCH: (_) => PatientSearchScreen(), diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 397d6745..de1f94f7 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -61,7 +61,7 @@ class _LoginsreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ (platformImei == null) - ? Column( + ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 93db7ea8..25ff04d4 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1,22 +1,22 @@ - -import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/widgets/dashboard/dashboard_item_icons_texts.dart'; -import 'package:doctor_app_flutter/widgets/dashboard/dashboard_item_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; -class DashboardPage extends StatefulWidget { - DashboardPage({Key key, this.title}) : super(key: key); +import '../presentation/doctor_app_icons.dart'; +import '../widgets/dashboard/dashboard_item_icons_texts.dart'; +import '../widgets/dashboard/dashboard_item_texts_widget.dart'; +import '../widgets/shared/app_drawer_widget.dart'; +import '../widgets/shared/rounded_container_widget.dart'; + +class DashboardScreen extends StatefulWidget { + DashboardScreen({Key key, this.title}) : super(key: key); final String title; @override - _MyHomePageState createState() => _MyHomePageState(); + _DashboardScreenState createState() => _DashboardScreenState(); } -class _MyHomePageState extends State { +class _DashboardScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( @@ -26,7 +26,7 @@ class _MyHomePageState extends State { textTheme: TextTheme( title: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), - title: Text(widget.title), + title: Text('Home'), leading: Builder(builder: (BuildContext context) { return new GestureDetector( onTap: () { @@ -44,7 +44,13 @@ class _MyHomePageState extends State { IconButton(icon: Icon(Icons.person), onPressed: null) ], ), - drawer: SafeArea( child: AppDrawer()), + drawer: Theme( + data: Theme.of(context).copyWith( + canvasColor: Colors.transparent, + ), + child: SafeArea(child: AppDrawer()), + ), + // , bottomNavigationBar: BottomNavigationBar(items: [ BottomNavigationBarItem( icon: Icon(DoctorApp.home_icon), @@ -85,8 +91,7 @@ class _MyHomePageState extends State { children: [ Expanded( flex: 2, - child: RoundedContainer( - CircularPercentIndicator( + child: RoundedContainer(CircularPercentIndicator( radius: 90.0, animation: true, animationDuration: 1200, @@ -113,9 +118,7 @@ class _MyHomePageState extends State { circularStrokeCap: CircularStrokeCap.butt, backgroundColor: Colors.blueGrey[100], progressColor: Colors.red, - ) - ) - ), + ))), Expanded( flex: 2, child: Row( diff --git a/lib/widgets/shared/rounded_container_widget.dart b/lib/widgets/shared/rounded_container_widget.dart index a4f89bf5..1ce9fc53 100644 --- a/lib/widgets/shared/rounded_container_widget.dart +++ b/lib/widgets/shared/rounded_container_widget.dart @@ -44,6 +44,7 @@ class _RoundedContainerState extends State { margin: EdgeInsets.all(widget.margin), decoration: widget.showBorder == true ? BoxDecoration( + color: Theme.of(context).primaryColor, border: Border.all(color: Colors.red, width: 1), borderRadius: widget.customCornerRaduis ? BorderRadius.only(