fetch feed optin button
This commit is contained in:
@@ -21,6 +21,7 @@ import 'dart:ui' as ui;
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
|
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:share_plus/share_plus.dart';
|
import 'package:share_plus/share_plus.dart';
|
||||||
@@ -54,8 +55,13 @@ class TabMenu extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
final showFeeds = useState(false);
|
||||||
|
|
||||||
return MenuAnchor(
|
return MenuAnchor(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
|
onClose: () {
|
||||||
|
showFeeds.value = false;
|
||||||
|
},
|
||||||
builder: (context, controller, child) {
|
builder: (context, controller, child) {
|
||||||
return child!;
|
return child!;
|
||||||
},
|
},
|
||||||
@@ -284,7 +290,18 @@ class TabMenu extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
WebsiteFeedMenuButton(selectedTabId),
|
Visibility(
|
||||||
|
visible: showFeeds.value,
|
||||||
|
replacement: MenuItemButton(
|
||||||
|
closeOnActivate: false,
|
||||||
|
leadingIcon: const Icon(Icons.rss_feed),
|
||||||
|
child: const Text('Fetch Feeds'),
|
||||||
|
onPressed: () {
|
||||||
|
showFeeds.value = true;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
child: WebsiteFeedMenuButton(selectedTabId),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ class WebsiteFeedMenuButton extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
loading: () => const MenuItemButton(
|
loading: () => const MenuItemButton(
|
||||||
leadingIcon: Icon(Icons.rss_feed),
|
leadingIcon: Icon(Icons.rss_feed),
|
||||||
trailingIcon: Bone.icon(),
|
|
||||||
child: Text('Available Web Feeds'),
|
child: Text('Available Web Feeds'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user