diff --git a/assets/popups/23f-recruiting.png b/assets/popups/23f-recruiting.png new file mode 100644 index 00000000..55791302 Binary files /dev/null and b/assets/popups/23f-recruiting.png differ diff --git a/assets/app-event-image-en.png b/assets/popups/app-event-image-en.png similarity index 100% rename from assets/app-event-image-en.png rename to assets/popups/app-event-image-en.png diff --git a/assets/app-event-image.png b/assets/popups/app-event-image.png similarity index 100% rename from assets/app-event-image.png rename to assets/popups/app-event-image.png diff --git a/assets/graduate-planner.png b/assets/popups/graduate-planner.png similarity index 100% rename from assets/graduate-planner.png rename to assets/popups/graduate-planner.png diff --git a/lib/home.dart b/lib/home.dart index d8abbc7a..6eaa4b7f 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -34,7 +34,9 @@ class _OTLHomeState extends State with SingleTickerProviderStateMixin { WidgetsBinding.instance.addPostFrameCallback( (_) async { - if ((await SharedPreferences.getInstance()).getBool('popup') ?? true) { + if ((await SharedPreferences.getInstance()) + .getBool('popup_recruiting_23f') ?? + true) { await OTLNavigator.pushDialog( context: context, builder: (context) => PopUp(), diff --git a/lib/widgets/pop_up.dart b/lib/widgets/pop_up.dart index 223fb214..8380ff7d 100644 --- a/lib/widgets/pop_up.dart +++ b/lib/widgets/pop_up.dart @@ -24,7 +24,7 @@ class _PopUpState extends State { contentPadding: EdgeInsets.all(0.0), actionsPadding: EdgeInsets.only(top: 8.0), elevation: 0.0, - content: _buildAppEvent(context), + content: _build23fRecruiting(), actions: [ Container( decoration: BoxDecoration( @@ -72,6 +72,54 @@ class _PopUpState extends State { } } +Widget _build23fRecruiting() { + return SingleChildScrollView( + child: Container( + child: Stack( + alignment: AlignmentDirectional.center, + children: [ + Image.asset( + 'assets/popups/23f-recruiting.png', + height: 328.0, + width: 285.0, + ), + Column( + children: [ + const SizedBox(height: 262.0), + FilledButton( + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Color(0xFFEBA12A)), + ), + onPressed: () => launchUrl( + Uri.parse( + 'https://apply.sparcs.org/', + ), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + '지원하러 가기', + style: evenBodyBold.copyWith(color: Colors.black), + textAlign: TextAlign.center, + ), + const SizedBox(width: 8.0), + Icon( + Icons.arrow_forward, + color: Colors.black, + ) + ], + ), + ), + ], + ), + ], + ), + ), + ); +} + +// ignore: unused_element Widget _buildAppEvent(BuildContext context) { final isEn = EasyLocalization.of(context)?.currentLocale == Locale('en'); @@ -82,8 +130,8 @@ Widget _buildAppEvent(BuildContext context) { children: [ Image.asset( isEn - ? 'assets/app-event-image-en.png' - : 'assets/app-event-image.png', + ? 'assets/popups/app-event-image-en.png' + : 'assets/popups/app-event-image.png', height: 328.0, width: 285.0, ), @@ -130,7 +178,7 @@ Widget _buildGraduatePlanner() { textAlign: TextAlign.center, ), const SizedBox(height: 16.0), - Image.asset('assets/graduate-planner.png', height: 128.0), + Image.asset('assets/popups/graduate-planner.png', height: 128.0), const SizedBox(height: 8.0), Text( '웹에서 지금 바로 만나보세요!', diff --git a/pubspec.yaml b/pubspec.yaml index 706c4828..959d38f7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -78,6 +78,7 @@ flutter: - assets/images/ - assets/translations/ - assets/icons/ + - assets/popups/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.