fix scaffold canvas color

merge-requests/7/head
Elham Rababah 6 years ago
parent 00c302ad5a
commit 973d40135a

@ -27,7 +27,6 @@ class MyApp extends StatelessWidget {
child: MaterialApp( child: MaterialApp(
title: 'Flutter Demo', title: 'Flutter Demo',
theme: ThemeData( theme: ThemeData(
canvasColor: Colors.transparent,
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
primaryColor: Hexcolor('#B8382C'), primaryColor: Hexcolor('#B8382C'),
buttonColor: Hexcolor('#B8382C'), buttonColor: Hexcolor('#B8382C'),

@ -28,7 +28,7 @@ const String MEDICINE_SEARCH = 'medicine-search';
const String SETTINGS = 'settings'; const String SETTINGS = 'settings';
var routes = { var routes = {
HOME: (_) => DashboardPage(title: 'Home',), HOME: (_) => DashboardScreen(),
INIT_ROUTE: (_) => Loginsreen(), INIT_ROUTE: (_) => Loginsreen(),
MY_SCHEDULE: (_) => MyScheduleScreen(), MY_SCHEDULE: (_) => MyScheduleScreen(),
PATIENT_SEARCH: (_) => PatientSearchScreen(), PATIENT_SEARCH: (_) => PatientSearchScreen(),

@ -61,7 +61,7 @@ class _LoginsreenState extends State<Loginsreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
(platformImei == null) (platformImei == null)
? Column( ? Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[

@ -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:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
class DashboardPage extends StatefulWidget { import '../presentation/doctor_app_icons.dart';
DashboardPage({Key key, this.title}) : super(key: key); 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; final String title;
@override @override
_MyHomePageState createState() => _MyHomePageState(); _DashboardScreenState createState() => _DashboardScreenState();
} }
class _MyHomePageState extends State<DashboardPage> { class _DashboardScreenState extends State<DashboardScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -26,7 +26,7 @@ class _MyHomePageState extends State<DashboardPage> {
textTheme: TextTheme( textTheme: TextTheme(
title: title:
TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
title: Text(widget.title), title: Text('Home'),
leading: Builder(builder: (BuildContext context) { leading: Builder(builder: (BuildContext context) {
return new GestureDetector( return new GestureDetector(
onTap: () { onTap: () {
@ -44,7 +44,13 @@ class _MyHomePageState extends State<DashboardPage> {
IconButton(icon: Icon(Icons.person), onPressed: null) 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: [ bottomNavigationBar: BottomNavigationBar(items: [
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(DoctorApp.home_icon), icon: Icon(DoctorApp.home_icon),
@ -85,8 +91,7 @@ class _MyHomePageState extends State<DashboardPage> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 2, flex: 2,
child: RoundedContainer( child: RoundedContainer(CircularPercentIndicator(
CircularPercentIndicator(
radius: 90.0, radius: 90.0,
animation: true, animation: true,
animationDuration: 1200, animationDuration: 1200,
@ -113,9 +118,7 @@ class _MyHomePageState extends State<DashboardPage> {
circularStrokeCap: CircularStrokeCap.butt, circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Colors.blueGrey[100], backgroundColor: Colors.blueGrey[100],
progressColor: Colors.red, progressColor: Colors.red,
) ))),
)
),
Expanded( Expanded(
flex: 2, flex: 2,
child: Row( child: Row(

@ -44,6 +44,7 @@ class _RoundedContainerState extends State<RoundedContainer> {
margin: EdgeInsets.all(widget.margin), margin: EdgeInsets.all(widget.margin),
decoration: widget.showBorder == true decoration: widget.showBorder == true
? BoxDecoration( ? BoxDecoration(
color: Theme.of(context).primaryColor,
border: Border.all(color: Colors.red, width: 1), border: Border.all(color: Colors.red, width: 1),
borderRadius: widget.customCornerRaduis borderRadius: widget.customCornerRaduis
? BorderRadius.only( ? BorderRadius.only(

Loading…
Cancel
Save