Skip to content

Commit

Permalink
refactor: exchange icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshor committed Aug 27, 2024
1 parent 6bbf64e commit 7738d8e
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 227 deletions.
15 changes: 0 additions & 15 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,11 @@ import 'package:go_router/go_router.dart';

import 'about/about_screen.dart';
import 'features/basket/basket.dart';
import 'home/home.dart';
import 'l10n/app_localizations.dart';
import 'repositories/fruits_repository.dart';
import 'ui/ui.dart';

final _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (_, __) => FutureBuilder(
future: FruitRepository().getFruits(),
builder: (_, snapshot) {
if (!snapshot.hasData) return const Placeholder();

return HomeScreen(
fruits: snapshot.data!,
);
},
),
),
GoRoute(
path: '/about',
builder: (context, state) => const AboutScreen(),
Expand Down
3 changes: 0 additions & 3 deletions lib/home/home.dart

This file was deleted.

43 changes: 0 additions & 43 deletions lib/home/home_screen.dart

This file was deleted.

39 changes: 0 additions & 39 deletions lib/home/widgets/add_basket_button.dart

This file was deleted.

114 changes: 0 additions & 114 deletions lib/home/widgets/fruit_card.dart

This file was deleted.

2 changes: 2 additions & 0 deletions lib/ui/foundation/text_styles.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: unused_field

import 'package:flutter/widgets.dart';
import 'package:google_fonts/google_fonts.dart';

Expand Down
12 changes: 6 additions & 6 deletions lib/ui/widgets/bottom_navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ class BottomNavigationBar extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
NavigationItem(
isSelected: true,
iconUnselected: FontAwesomeIcons.shop,
iconSelected: FontAwesomeIcons.shop,
isSelected: false,
iconUnselected: FontAwesomeIcons.lemon,
iconSelected: FontAwesomeIcons.solidLemon,
text: AppLocalizations.of(context)!.navigationShopLabel,
),
NavigationItem(
isSelected: false,
iconUnselected: FontAwesomeIcons.basketShopping,
iconSelected: FontAwesomeIcons.basketShopping,
isSelected: true,
iconUnselected: FontAwesomeIcons.rectangleList,
iconSelected: FontAwesomeIcons.solidRectangleList,
text: AppLocalizations.of(context)!.navigationBasketLabel,
),
NavigationItem(
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class IconButton extends StatefulWidget {
final VoidCallback onPressed;

@override
_IconButtonState createState() => _IconButtonState();
IconButtonState createState() => IconButtonState();
}

class _IconButtonState extends State<IconButton> {
class IconButtonState extends State<IconButton> {
double _scale = 1;

void _onTapDown(TapDownDetails details) {
Expand Down
2 changes: 1 addition & 1 deletion widgetbook/lib/ui/widgets/bottom_navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import 'package:widgetbook_annotation/widgetbook_annotation.dart';
designLink:
'https://www.figma.com/design/HsANkdhbsCNTkXBzNJRNLD/Groceries-Demo?node-id=7271-52117&t=N6qwmLP7MP59ClWB-4',
)
Widget buildDesignSystemBottomNavigationBarUseCase(BuildContext context) {
Widget buildBottomNavigationBarUseCase(BuildContext context) {
return const BottomNavigationBar();
}
2 changes: 1 addition & 1 deletion widgetbook/lib/ui/widgets/icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:widgetbook_annotation/widgetbook_annotation.dart';
designLink:
'https://www.figma.com/design/HsANkdhbsCNTkXBzNJRNLD/Groceries-Demo?node-id=7337-3250&t=N6qwmLP7MP59ClWB-4',
)
Widget buildDesignSystemIconButtonUseCase(BuildContext context) {
Widget buildIconButtonUseCase(BuildContext context) {
return IconButton(
icon: FontAwesomeIcons.user,
onPressed: () {},
Expand Down
6 changes: 3 additions & 3 deletions widgetbook/lib/ui/widgets/navigation_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import 'package:widgetbook_annotation/widgetbook_annotation.dart';
designLink:
'https://www.figma.com/design/HsANkdhbsCNTkXBzNJRNLD/Groceries-Demo?node-id=7395-4299&t=N6qwmLP7MP59ClWB-4',
)
Widget buildDesignSystemNavigationItemUseCase(BuildContext context) {
Widget buildNavigationItemUseCase(BuildContext context) {
return NavigationItem(
isSelected: context.knobs.boolean(
label: 'isSelected',
),
iconSelected: FontAwesomeIcons.solidUser,
iconUnselected: FontAwesomeIcons.user,
iconSelected: FontAwesomeIcons.solidLemon,
iconUnselected: FontAwesomeIcons.lemon,
text: context.knobs.string(
label: 'text',
initialValue: 'Account',
Expand Down

0 comments on commit 7738d8e

Please sign in to comment.