diff --git a/lib/constants.dart b/lib/constants.dart index fd27293..2362c9c 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -53,4 +53,3 @@ const routeSettings = '/settings'; const routeSettingsExport = '/settings/export'; const routeSettingsHome = '/settings/home'; const routeStatus = '/status'; -const routeSubscriptionsImport = '/subscriptions/import'; diff --git a/lib/main.dart b/lib/main.dart index 7ddcd42..5632490 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -422,7 +422,6 @@ class _FritterAppState extends State { routeSettingsExport: (context) => const SettingsExportScreen(), routeSettingsHome: (context) => const SettingsHomeFragment(), routeStatus: (context) => const StatusScreen(), - routeSubscriptionsImport: (context) => const SubscriptionImportScreen() }, builder: (context, child) { // Replace the default red screen of death with a slightly friendlier one diff --git a/lib/subscriptions/_list.dart b/lib/subscriptions/_list.dart index 40eca14..de4ab86 100644 --- a/lib/subscriptions/_list.dart +++ b/lib/subscriptions/_list.dart @@ -3,6 +3,7 @@ import 'package:flutter_triple/flutter_triple.dart'; import 'package:quacker/constants.dart'; import 'package:quacker/database/entities.dart'; import 'package:quacker/search/search.dart'; +import 'package:quacker/subscriptions/_import.dart'; import 'package:quacker/subscriptions/users_model.dart'; import 'package:quacker/ui/errors.dart'; import 'package:quacker/user.dart'; @@ -51,7 +52,10 @@ class _SubscriptionUsersState extends State { margin: const EdgeInsets.symmetric(vertical: 8), child: ElevatedButton( child: Text(L10n.of(context).import_from_twitter), - onPressed: () => Navigator.pushNamed(context, routeSubscriptionsImport), + onPressed: () => showModalBottomSheet( + context: context, + builder: (context) => const SubscriptionImportScreen(), + ), ), ) ])); diff --git a/lib/subscriptions/subscriptions.dart b/lib/subscriptions/subscriptions.dart index 49d283e..fc1ace1 100644 --- a/lib/subscriptions/subscriptions.dart +++ b/lib/subscriptions/subscriptions.dart @@ -3,6 +3,7 @@ import 'package:quacker/constants.dart'; import 'package:quacker/generated/l10n.dart'; import 'package:quacker/home/home_screen.dart'; import 'package:quacker/subscriptions/_groups.dart'; +import 'package:quacker/subscriptions/_import.dart'; import 'package:quacker/subscriptions/_list.dart'; import 'package:quacker/subscriptions/users_model.dart'; import 'package:provider/provider.dart'; @@ -20,7 +21,10 @@ class SubscriptionsScreen extends StatelessWidget { actions: [ IconButton( icon: const Icon(Icons.cloud_download), - onPressed: () => Navigator.pushNamed(context, routeSubscriptionsImport), + onPressed: () => showModalBottomSheet( + context: context, + builder: (context) => const SubscriptionImportScreen(), + ), ), IconButton( icon: const Icon(Icons.refresh),