mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 19:17:56 +00:00
Redesigned Splash Screen and Login Screen
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/splash/view/widgets/user_agreement_dialog.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
|
||||
@@ -10,25 +10,46 @@ class SplashView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
//TODO remove this delay
|
||||
Future.delayed(
|
||||
const Duration(seconds: 3),
|
||||
const Duration(seconds: 5),
|
||||
() {
|
||||
Navigator.popAndPushNamed(
|
||||
context,
|
||||
Routes.authRoute,
|
||||
Routes.authLogin,
|
||||
);
|
||||
},
|
||||
);
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: InkWell(
|
||||
//TODO check if user agreement is accepted
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => const UserAgreementDialog(),
|
||||
);
|
||||
},
|
||||
child: Image.asset(Assets.imagesBlackLogo)),
|
||||
body: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
Assets.imagesBackground,
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(Assets.imagesVector),
|
||||
fit: BoxFit.cover,
|
||||
opacity: 0.9,
|
||||
),
|
||||
),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
Assets.imagesLogo,
|
||||
width: 240,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,15 +15,19 @@ class UserAgreementDialog extends StatelessWidget {
|
||||
const Text('By using this app you agree to the terms and conditions'),
|
||||
actions: [
|
||||
DefaultButton(
|
||||
text: 'I Agree',
|
||||
child: const Text(
|
||||
'Login',
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
DefaultButton(
|
||||
text: 'I Disagree',
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
isSecondary: true,
|
||||
child: const Text(
|
||||
'Cancel',
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user