This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Column( | |
| mainAxisSize: MainAxisSize.min, | |
| children: sections.entries.mapIndexed( | |
| (index, e) { | |
| // 3 | |
| final itemAnimation = CurvedAnimation( | |
| parent: animationController, | |
| curve: Interval( | |
| 10 / timelineFrames + | |
| (5 - index) * 1 / 5 * 10 / timelineFrames, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void onItemTapped(int index) { | |
| _selectedIndex = index; | |
| switch (index) { | |
| case 0: | |
| context.goNamed(Routes.signInAndSecurity.name); | |
| break; | |
| case 1: | |
| context.goNamed(Routes.personalInformation.name); | |
| break; | |
| case 2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:appleid_dashboard/shared/responsive.dart'; | |
| import 'package:collection/collection.dart'; | |
| import 'package:flutter/material.dart'; | |
| import '../menu/view_model.dart'; | |
| class AppBar extends StatefulWidget { | |
| final ValueChanged<int> onItemTapped; | |
| const AppBar({super.key, required this.onItemTapped}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:appleid_dashboard/router/routes.dart'; | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(const MyApp()); | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| final colorScheme = ColorScheme.fromSeed(seedColor: Colors.blue); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension MenuItemTypeFromString on MenuItemType { | |
| static MenuItemType fromString(String value) { | |
| if (value == Routes.signInAndSecurity.value) { | |
| return MenuItemType.security; | |
| } else if (value == Routes.personalInformation.value) { | |
| return MenuItemType.information; | |
| } else if (value == Routes.paymentMethods.value) { | |
| return MenuItemType.payment; | |
| } else if (value == Routes.familySharing.value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum Routes { | |
| home(''), | |
| signInAndSecurity('security'), | |
| personalInformation('information'), | |
| paymentMethods('payment'), | |
| familySharing('family'), | |
| devices('devices'), | |
| privacy('privacy'); | |
| const Routes(this.value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| Widget build(BuildContext context) { | |
| return AnimatedLayout( | |
| duration: const Duration(milliseconds: 250), | |
| layoutState: Responsive.isMobile(context) ? LayoutState.open : LayoutState.close, | |
| fromBuilder: (context) => _NonMobileModal( | |
| icon: icon, | |
| title: title, | |
| onCloseButtonPressed: onCloseButtonPressed, | |
| child: child), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void onCardPressed(SignInSecurityCardType type) { | |
| showDialog( | |
| context: context, | |
| barrierColor: Colors.grey.withOpacity(0.8), | |
| barrierDismissible: true, | |
| builder: (context) { | |
| switch (type) { | |
| case SignInSecurityCardType.appleId: | |
| break; | |
| case SignInSecurityCardType.password: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Center( | |
| child: Responsive( | |
| mobile: _BelowDesktopLayout(), | |
| tablet: _BelowDesktopLayout(), | |
| desktop: _DesktopLayout(), | |
| ), | |
| ) |
NewerOlder