diff --git a/assets/images/subscribe.png b/assets/images/subscribe.png new file mode 100644 index 0000000..c96b002 Binary files /dev/null and b/assets/images/subscribe.png differ diff --git a/lib/main.dart b/lib/main.dart index 2da86ff..2599d7e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -45,7 +45,7 @@ class MyApp extends StatelessWidget { title: 'Moneyger', debugShowCheckedModeBanner: false, theme: AppThemeData.getThemeLight(), - home: const SubscribePage(), + home: const SplashScreen(), ); } } diff --git a/lib/ui/bottom_navigation/item/home.dart b/lib/ui/bottom_navigation/item/home.dart index c2aba3b..763ce08 100644 --- a/lib/ui/bottom_navigation/item/home.dart +++ b/lib/ui/bottom_navigation/item/home.dart @@ -3,6 +3,7 @@ import 'package:moneyger/common/color_value.dart'; import 'package:moneyger/main.dart'; import 'package:moneyger/service/api_service.dart'; import 'package:moneyger/ui/chat/chat.dart'; +import 'package:moneyger/ui/subscribe/subscribe.dart'; import 'package:moneyger/ui/widget/artikel/artikel_card.dart'; import 'package:moneyger/ui/widget/chart/chart_widget.dart'; import 'package:moneyger/ui/widget/detail_transaction_item.dart'; @@ -220,7 +221,7 @@ class _HomePageState extends State { isiArtikel: _artikel[index].isiArtikel, ); }, - ) + ), ], ), ), @@ -228,4 +229,82 @@ class _HomePageState extends State { ), ); } + + Future showpopup() { + return showDialog( + context: context, + builder: (context) { + return AlertDialog( + backgroundColor: ColorValue.secondaryColor, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(10))), + content: SizedBox( + width: 272.0, + height: 315, + child: Column( + children: [ + GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: const Align( + alignment: Alignment.topRight, + child: Icon( + Icons.close, + size: 24, + color: Colors.white, + ), + ), + ), + Container( + width: 200, + height: 126, + margin: const EdgeInsets.only(top: 28, bottom: 8), + child: const Image( + image: AssetImage('assets/images/subscribe.png')), + ), + const SizedBox( + width: 200, + child: Text( + 'Atur keuanganmu dengan mudah menggunakan Monyeger Premium', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w500, + color: Colors.white), + ), + ), + const SizedBox( + height: 21, + ), + ElevatedButton( + style: ElevatedButton.styleFrom( + primary: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + elevation: 0, + ), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const SubscribePage(), + )); + }, + child: const Text( + 'Berlangganan', + style: TextStyle(color: ColorValue.secondaryColor), + ), + ), + const SizedBox( + height: 32, + ) + ], + ), + ), + ); + }, + ); + } }