Skip to content

Commit

Permalink
feat: response screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanRns committed May 8, 2024
1 parent 8fa9783 commit cef3633
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 5 deletions.
3 changes: 2 additions & 1 deletion evently/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
"number_tickets": "Number of Tickets",
"network_fee_listed_price_occur_on_chain": "A network fee of 10% the listed price is required for all transactions that occur on-chain",
"maximum_1000": "1,000 maximum",
"publish": "Publish"
"publish": "Publish",
"enjoy_the_event": "Enjoy the event!"
}
3 changes: 2 additions & 1 deletion evently/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
"number_tickets": "Number of Tickets",
"network_fee_listed_price_occur_on_chain": "A network fee of 10% the listed price is required for all transactions that occur on-chain",
"maximum_1000": "1,000 maximum",
"publish": "Publish"
"publish": "Publish",
"enjoy_the_event": "Enjoy the event!"
}
3 changes: 2 additions & 1 deletion evently/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
"number_tickets": "Number of Tickets",
"network_fee_listed_price_occur_on_chain": "A network fee of 10% the listed price is required for all transactions that occur on-chain",
"maximum_1000": "1,000 maximum",
"publish": "Publish"
"publish": "Publish",
"enjoy_the_event": "Enjoy the event!"
}
3 changes: 2 additions & 1 deletion evently/i18n/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
"number_tickets": "Number of Tickets",
"network_fee_listed_price_occur_on_chain": "A network fee of 10% the listed price is required for all transactions that occur on-chain",
"maximum_1000": "1,000 maximum",
"publish": "Publish"
"publish": "Publish",
"enjoy_the_event": "Enjoy the event!"
}
1 change: 1 addition & 0 deletions evently/lib/generated/locale_keys.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ abstract class LocaleKeys {
static const network_fee_listed_price_occur_on_chain = 'network_fee_listed_price_occur_on_chain';
static const maximum_1000 = 'maximum_1000';
static const publish = 'publish';
static const enjoy_the_event = 'enjoy_the_event';

}
4 changes: 4 additions & 0 deletions evently/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:ui';
import 'package:easy_localization/easy_localization.dart';
import 'package:evently/evently_provider.dart';
import 'package:evently/screens/buyer_status_screen.dart';
import 'package:evently/screens/create_event.dart';
import 'package:evently/screens/event_hub/event_hub_screen.dart';
import 'package:evently/screens/host_view_ticket_preview.dart';
Expand Down Expand Up @@ -54,9 +55,11 @@ class MyApp extends StatelessWidget {
child: ScreenUtilInit(
minTextAdapt: true,
builder: (BuildContext context, child) => MaterialApp(

builder: (context, widget) {
ScreenUtil.init(context);
return MediaQuery(

data: MediaQuery.of(context).copyWith(textScaler: TextScaler.noScaling),
child: widget!,
);
Expand All @@ -73,6 +76,7 @@ class MyApp extends StatelessWidget {
RouteUtil.kRouteEventHub: (context) => const EventHubScreen(),
RouteUtil.kCreateEvent: (context) => const CreateEvent(),
RouteUtil.kHostTicketPreview: (context) => const HostTicketPreview(),
RouteUtil.kBuyerResponse: (context) => const BuyerResponseScreen(),
},
),
),
Expand Down
47 changes: 47 additions & 0 deletions evently/lib/screens/buyer_status_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:evently/generated/locale_keys.g.dart';
import 'package:evently/utils/evently_app_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class BuyerResponseScreen extends StatefulWidget {
const BuyerResponseScreen({super.key});

@override
State<BuyerResponseScreen> createState() => _BuyerResponseScreenState();
}

class _BuyerResponseScreenState extends State<BuyerResponseScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: EventlyAppTheme.kLightGreen,
body: SizedBox(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
LocaleKeys.enjoy_the_event.tr(),
style: const TextStyle(fontSize: 28, fontWeight: FontWeight.bold, color: EventlyAppTheme.kWhite),
),
SizedBox(
height: 10.h,
),
Container(
height: 161,
width: 161,
decoration: const BoxDecoration(shape: BoxShape.circle, color: EventlyAppTheme.kWhite),
child: const Icon(
Icons.check,
size: 161,
color: EventlyAppTheme.kLightGreen,
),
)
],
),
),
);
}
}
2 changes: 1 addition & 1 deletion evently/lib/screens/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
Future.delayed(const Duration(seconds: kSplashScreenDuration), () {
navigatorKey.currentState!.pushReplacementNamed(RouteUtil.kRouteEventHub);
navigatorKey.currentState!.pushReplacementNamed(RouteUtil.kBuyerResponse);
});
super.initState();
}
Expand Down
1 change: 1 addition & 0 deletions evently/lib/utils/evently_app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class EventlyAppTheme {
static const Color kPurple03 = Color(0xFFCBC8F3);
static const Color kLightPurple = Color(0xFFB6B6E8);
static const Color kDarkGreen = Color(0xFF14FB00);
static const Color kLightGreen = Color(0xFF0CAF59);
static const Color kYellow = Color(0xFFF3BA2F);
static const Color kLightYellow = Color(0xFFFED564);
static const Color kLightRed = Color(0xFFEF4421);
Expand Down
1 change: 1 addition & 0 deletions evently/lib/utils/route_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ class RouteUtil {
static String kRouteEventHub = "/eventHub";
static String kCreateEvent = "/createEvent";
static String kHostTicketPreview = "/hostTicketPreview";
static String kBuyerResponse = "/buyerResponse";
}

0 comments on commit cef3633

Please sign in to comment.