initialized Splash UI

initialized Login UI
initialized Home(no Devices) UI
Added Colors (from syncrow website)
Added Logo
This commit is contained in:
Mohammad Salameh
2024-02-15 00:10:33 +03:00
parent 3385ed1297
commit 16f47f744c
24 changed files with 316 additions and 92 deletions
+20 -3
View File
@@ -1,12 +1,21 @@
import 'package:flutter/material.dart';
import 'package:syncrow_app/features/splash/user_agreement_dialog.dart';
import 'package:syncrow_app/navigation/route_manager.dart';
import 'package:syncrow_app/navigation/routing_constants.dart';
import 'package:syncrow_app/resource_manager/assets_manager.dart';
class SplashView extends StatelessWidget {
const SplashView({super.key});
@override
Widget build(BuildContext context) {
//TODO Remove delay
// Future.delayed(const Duration(seconds: 5), () {
// RouteManager().routerManagerPushUntil(
// context,
// routeName: Routes.homeRoute,
// );
// });
return Scaffold(
appBar: AppBar(
actions: [
@@ -14,15 +23,23 @@ class SplashView extends StatelessWidget {
icon: const Icon(Icons.arrow_forward),
onPressed: () {
RouteManager().routerManagerPopAndPushNamed(
routeName: Routes.homeRoute,
routeName: Routes.authRoute,
context: context,
);
},
),
],
),
body: const Center(
child: Text('Splash Screen'),
body: Center(
child: InkWell(
//TODO check if user agreement is accepted
onTap: () {
showDialog(
context: context,
builder: (context) => const UserAgreementDialog(),
);
},
child: Image.asset(ImageManager.blackLogo)),
),
);
}
@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:syncrow_app/features/shared_widgets/default_text_button.dart';
class UserAgreementDialog extends StatelessWidget {
const UserAgreementDialog({
super.key,
});
@override
Widget build(BuildContext context) {
return AlertDialog(
elevation: 40,
title: const Text('User Agreement'),
content:
const Text('By using this app you agree to the terms and conditions'),
actions: [
DefaultTextButton(
text: 'I Agree',
onPressed: () {
Navigator.of(context).pop();
},
isPrimary: true,
),
DefaultTextButton(
text: 'I Disagree',
onPressed: () => Navigator.of(context).pop(),
),
],
);
}
}