Skip to content

Commit

Permalink
SNRGY-3272 change route of add favorites button
Browse files Browse the repository at this point in the history
  • Loading branch information
zsco committed May 6, 2024
1 parent 1f963d2 commit 6e8cb8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions lib/widgets/tabs/favorites/favorites.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import 'package:mobile_app/widgets/tabs/device_tabs.dart';
import 'package:mobile_app/widgets/tabs/shared/device_list_item.dart';
import 'package:mobile_app/widgets/tabs/shared/group_list_item.dart';

import '../nav.dart';

class DeviceListFavorites extends StatefulWidget {
const DeviceListFavorites({Key? key}) : super(key: key);

Expand All @@ -43,9 +45,9 @@ class _DeviceListFavoritesState extends State<DeviceListFavorites> with WidgetsB
StreamSubscription? _refreshSubscription;
bool _init = false;

_openFavorites(BuildContext context) {
_openDeviceListView(BuildContext context) {
final parentState = context.findAncestorStateOfType<State<DeviceTabs>>() as DeviceTabsState?;
parentState?.switchScreen(6, true);
parentState?.switchScreen(tabDevices, true);
}

@override
Expand Down Expand Up @@ -108,7 +110,7 @@ class _DeviceListFavoritesState extends State<DeviceListFavorites> with WidgetsB
child: PlatformElevatedButton(
widgetKey: _keyFavButton,
child: const Text("Add Favorites"),
onPressed: () => _openFavorites(context),
onPressed: () => _openDeviceListView(context),
))),
],
),
Expand Down Expand Up @@ -174,7 +176,7 @@ class _DeviceListFavoritesState extends State<DeviceListFavorites> with WidgetsB
],
colorShadow: MyTheme.appColor,
onClickTarget: (_) {
_openFavorites(context);
_openDeviceListView(context);
},
alignSkip: Alignment.topRight,
).show(context: context);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.0.311+311
version: 0.0.312+312


environment:
Expand Down

0 comments on commit 6e8cb8f

Please sign in to comment.