mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-24 20:37:55 +00:00
initialized Splash UI
initialized Login UI initialized Home(no Devices) UI Added Colors (from syncrow website) Added Logo
This commit is contained in:
@@ -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(),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user