Skip to content

Commit

Permalink
Merge pull request #138 from ia-toki/update/copywriting
Browse files Browse the repository at this point in the history
Update Copywriting Check Version
  • Loading branch information
1234iqbal authored Feb 27, 2024
2 parents 30a09ce + 6bc1e0e commit bde5abf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
1 change: 1 addition & 0 deletions app/lib/features/onboarding/presentation/pages/_pages.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:url_launcher/url_launcher.dart';
Expand Down
39 changes: 22 additions & 17 deletions app/lib/features/onboarding/presentation/pages/update_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,34 @@ class UpdateDialog extends StatelessWidget {
content: const SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text('Sebuah versi baru dari aplikasi tersedia.'),
Text(
'Silakan perbarui ke versi terbaru untuk '
'menikmati fitur dan perbaikan baru.'
'Versi terbaru dari aplikasi sudah tersedia. '
'Silahkan download aplikasi terbaru untuk menggunakan '
'Bebras Pandai'
),
],
),
),
actions: <Widget>[
Center(
child: TextButton(
child: const Text('Update Sekarang'),
onPressed: () async {
// Navigator.of(context).pop();
final url = Uri.parse(
'https://play.google.com/store/apps/details?id=com.toki.bebras_pandai&hl=en-US&ah=i6XiDj6PnW-iPzIlbXBXM-jTYjA',
);
if (!await launchUrl(url)) {
throw Exception('Could not launch $url');
}
},
),
)
TextButton(
child: const Text('Keluar Aplikasi'),
onPressed: () {
Navigator.of(context).pop();
SystemNavigator.pop();
},
),
TextButton(
child: const Text('Update Sekarang'),
onPressed: () async {
// Navigator.of(context).pop();
final url = Uri.parse(
'https://play.google.com/store/apps/details?id=com.toki.bebras_pandai&hl=en-US&ah=i6XiDj6PnW-iPzIlbXBXM-jTYjA',
);
if (!await launchUrl(url)) {
throw Exception('Could not launch $url');
}
},
),
],
)
);
Expand Down

0 comments on commit bde5abf

Please sign in to comment.