initialized Application theme

This commit is contained in:
Mohammad Salameh
2024-02-17 16:27:27 +03:00
parent 16f47f744c
commit 3190361901
98 changed files with 871 additions and 1004 deletions
+38
View File
@@ -0,0 +1,38 @@
import 'package:flutter/material.dart';
import 'package:syncrow_app/features/splash/view/widgets/user_agreement_dialog.dart';
import 'package:syncrow_app/navigation/routing_constants.dart';
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
class SplashView extends StatelessWidget {
const SplashView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
actions: [
IconButton(
icon: const Icon(Icons.arrow_forward),
onPressed: () {
Navigator.popAndPushNamed(
context,
Routes.authRoute,
);
},
),
],
),
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();
},
),
DefaultTextButton(
text: 'I Disagree',
onPressed: () => Navigator.of(context).pop(),
isSecondary: true,
),
],
);
}
}