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(
title: 'Flutter Demo',
theme: ThemeData(
canvasColor: Colors.transparent,
primarySwatch: Colors.blue,
primaryColor: Hexcolor('#B8382C'),
buttonColor: Hexcolor('#B8382C'),

@ -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(),

@ -61,7 +61,7 @@ class _LoginsreenState extends State<Loginsreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
(platformImei == null)
? Column(
? Column(
crossAxisAlignment:
CrossAxisAlignment.start,
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: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<DashboardPage> {
class _DashboardScreenState extends State<DashboardScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
@ -26,7 +26,7 @@ class _MyHomePageState extends State<DashboardPage> {
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<DashboardPage> {
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<DashboardPage> {
children: <Widget>[
Expanded(
flex: 2,
child: RoundedContainer(
CircularPercentIndicator(
child: RoundedContainer(CircularPercentIndicator(
radius: 90.0,
animation: true,
animationDuration: 1200,
@ -113,9 +118,7 @@ class _MyHomePageState extends State<DashboardPage> {
circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Colors.blueGrey[100],
progressColor: Colors.red,
)
)
),
))),
Expanded(
flex: 2,
child: Row(

@ -44,6 +44,7 @@ class _RoundedContainerState extends State<RoundedContainer> {
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(

Loading…
Cancel
Save