Skip to content

Commit

Permalink
add; subscriptions import bottom modal
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHCJ committed Apr 7, 2024
1 parent 1f26a94 commit ec15de4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ const routeSettings = '/settings';
const routeSettingsExport = '/settings/export';
const routeSettingsHome = '/settings/home';
const routeStatus = '/status';
const routeSubscriptionsImport = '/subscriptions/import';
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ class _FritterAppState extends State<FritterApp> {
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
Expand Down
6 changes: 5 additions & 1 deletion lib/subscriptions/_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -51,7 +52,10 @@ class _SubscriptionUsersState extends State<SubscriptionUsers> {
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(),
),
),
)
]));
Expand Down
6 changes: 5 additions & 1 deletion lib/subscriptions/subscriptions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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),
Expand Down

0 comments on commit ec15de4

Please sign in to comment.