merged master and updated structure

pull/3/head
faizatflutter 2 months ago
parent e2b0930dd1
commit 89e9323d9e

@ -4,14 +4,12 @@ import 'package:hmg_patient_app_new/features/authentication/models/authenticated
import 'package:hmg_patient_app_new/main.dart'; import 'package:hmg_patient_app_new/main.dart';
import 'api_consts.dart' as ApiConsts; import 'api_consts.dart' as ApiConsts;
import 'consts.dart';
class AppState { class AppState {
// Simple constructor - let get_it handle the singleton behavior // Simple constructor - let get_it handle the singleton behavior
AppState(); AppState();
//Tokens
bool isAuthenticated = false;
bool isAuthenticated = true; bool isAuthenticated = true;

@ -5,18 +5,14 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart'; import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/providers/authentication_view_model.dart';
import 'package:hmg_patient_app_new/providers/bottom_navigation_provider.dart'; import 'package:hmg_patient_app_new/providers/bottom_navigation_provider.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:hmg_patient_app_new/services/logger_service.dart';
import 'package:hmg_patient_app_new/theme/app_theme.dart'; import 'package:hmg_patient_app_new/theme/app_theme.dart';
import 'package:logger/logger.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:provider/single_child_widget.dart'; import 'package:provider/single_child_widget.dart';
import 'core/utils/size_utils.dart'; import 'core/utils/size_utils.dart';
import 'firebase_options.dart'; import 'firebase_options.dart';

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/int_extensions.dart'; import 'package:hmg_patient_app_new/extensions/int_extensions.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
@ -10,15 +12,11 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/home/data/landing_page_data.dart'; import 'package:hmg_patient_app_new/presentation/home/data/landing_page_data.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart';
import 'package:hmg_patient_app_new/providers/authentication_view_model.dart';
import 'package:hmg_patient_app_new/providers/bottom_navigation_provider.dart'; import 'package:hmg_patient_app_new/providers/bottom_navigation_provider.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../core/app_assets.dart';
import '../../core/utils/utils.dart';
import '../../widgets/buttons/custom_button.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
const LandingPage({super.key}); const LandingPage({super.key});
@ -27,7 +25,6 @@ class LandingPage extends StatefulWidget {
} }
class _LandingPageState extends State<LandingPage> { class _LandingPageState extends State<LandingPage> {
late AuthenticationViewModel authenticationViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -80,33 +77,31 @@ class _LandingPageState extends State<LandingPage> {
), ),
child: Padding( child: Padding(
padding: EdgeInsets.all(12.h), padding: EdgeInsets.all(12.h),
child: Container( child: Column(
child: Column( children: [
children: [ Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h),
Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h), SizedBox(height: 12.h),
SizedBox(height: 12.h), "You do not have any upcoming appointment. Please book an appointment".toText12(isCenter: true),
"You do not have any upcoming appointment. Please book an appointment".toText12(isCenter: true), SizedBox(height: 12.h),
SizedBox(height: 12.h), CustomButton(
CustomButton( text: LocaleKeys.bookAppo.tr(context: context),
text: LocaleKeys.bookAppo.tr(context: context), onPressed: () {
onPressed: () { Navigator.of(context).pushReplacement(
Navigator.of(context).pushReplacement( MaterialPageRoute(builder: (BuildContext context) => LandingPage()),
MaterialPageRoute(builder: (BuildContext context) => LandingPage()), );
); },
}, backgroundColor: Color(0xffFEE9EA),
backgroundColor: Color(0xffFEE9EA), borderColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA), textColor: Color(0xffED1C2B),
textColor: Color(0xffED1C2B), fontSize: 14,
fontSize: 14, fontWeight: FontWeight.w500,
fontWeight: FontWeight.w500, borderRadius: 12,
borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40,
height: 40, icon: AppAssets.add_icon,
icon: AppAssets.add_icon, iconColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor, ),
), ],
],
),
), ),
), ),
), ),

Loading…
Cancel
Save