Latest Code

merge-requests/1/merge
mirza.shafique 3 years ago
parent 416c79ca09
commit 88ad86146b

@ -57,17 +57,14 @@ class _DashboardPageState extends State<DashboardPage> {
return Scaffold( return Scaffold(
appBar: appBar(context, title: "Logo/Brand", isRemoveBackButton: true), appBar: appBar(context, title: "Logo/Brand", isRemoveBackButton: true),
drawer: showDrawer(context), drawer: showDrawer(context),
body: Container( body: Center(
child: Center(
child: LocaleKeys.dashboard.tr().toText24(), child: LocaleKeys.dashboard.tr().toText24(),
), ),
),
); );
} }
Widget showDrawer(BuildContext context) { Widget showDrawer(BuildContext context) {
return Drawer( return Drawer(
child: Container(
child: Column( child: Column(
children: [ children: [
Stack(children: [ Stack(children: [
@ -95,7 +92,7 @@ class _DashboardPageState extends State<DashboardPage> {
color: Colors.grey[200], color: Colors.grey[200],
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
), ),
child: Icon( child: const Icon(
Icons.edit, Icons.edit,
color: MyColors.darkPrimaryColor, color: MyColors.darkPrimaryColor,
).onPress(() { ).onPress(() {
@ -111,7 +108,7 @@ class _DashboardPageState extends State<DashboardPage> {
color: Colors.grey[200], color: Colors.grey[200],
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
), ),
child: Icon( child: const Icon(
Icons.delete, Icons.delete,
color: Colors.red, color: Colors.red,
).onPress(() async { ).onPress(() async {
@ -135,7 +132,7 @@ class _DashboardPageState extends State<DashboardPage> {
Container( Container(
width: double.infinity, width: double.infinity,
color: MyColors.darkPrimaryColor.withOpacity(0.1), color: MyColors.darkPrimaryColor.withOpacity(0.1),
padding: EdgeInsets.all(20), padding: const EdgeInsets.all(20),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -161,21 +158,21 @@ class _DashboardPageState extends State<DashboardPage> {
), ),
), ),
ListTile( ListTile(
leading: Icon( leading: const Icon(
Icons.notifications, Icons.notifications,
color: MyColors.darkPrimaryColor, color: MyColors.darkPrimaryColor,
), ),
title: LocaleKeys.notifications.tr().toText12(), title: LocaleKeys.notifications.tr().toText12(),
), ),
ListTile( ListTile(
leading: Icon( leading: const Icon(
Icons.settings, Icons.settings,
color: MyColors.darkPrimaryColor, color: MyColors.darkPrimaryColor,
), ),
title: LocaleKeys.general.tr().toText12(), title: LocaleKeys.general.tr().toText12(),
), ),
ListTile( ListTile(
leading: Icon( leading: const Icon(
Icons.person, Icons.person,
color: MyColors.darkPrimaryColor, color: MyColors.darkPrimaryColor,
), ),
@ -197,7 +194,7 @@ class _DashboardPageState extends State<DashboardPage> {
}, },
), ),
ListTile( ListTile(
leading: Icon( leading: const Icon(
Icons.logout, Icons.logout,
color: MyColors.darkPrimaryColor, color: MyColors.darkPrimaryColor,
), ),
@ -209,17 +206,19 @@ class _DashboardPageState extends State<DashboardPage> {
), ),
], ],
), ),
),
); );
} }
void _openImagePicker() { void _openImagePicker() {
showDialog<ImageSource>( showDialog<ImageSource>(
context: context, context: context,
builder: (context) => AlertDialog(content: Text("Choose image source"), actions: [ builder: (context) => AlertDialog(
TextButton(child: Text("Camera"), onPressed: () => cameraImage()), content: const Text("Choose image source"),
TextButton(child: Text("Gallery"), onPressed: () => gallaryImage()), actions: [
]), TextButton(child: const Text("Camera"), onPressed: () => cameraImage()),
TextButton(child: const Text("Gallery"), onPressed: () => gallaryImage()),
],
),
// .then((ImageSource source) async { // .then((ImageSource source) async {
// if (source != null) { // if (source != null) {
// final pickedFile = await ImagePicker().getImage(source: source); // final pickedFile = await ImagePicker().getImage(source: source);

@ -8,6 +8,8 @@ import 'package:flutter/material.dart';
import '../../classes/colors.dart'; import '../../classes/colors.dart';
class SplashPage extends StatelessWidget { class SplashPage extends StatelessWidget {
const SplashPage({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
performTimer(context); performTimer(context);

Loading…
Cancel
Save