Add FontAwesome icons
This commit is contained in:
parent
ac977a3536
commit
0c6b60f413
|
|
@ -2,18 +2,11 @@ import 'package:flutter/widgets.dart';
|
|||
|
||||
class NinjaKeys {
|
||||
|
||||
static final snackbar = const Key('__snackbar__');
|
||||
static Key snackbarAction(String id) => Key('__snackbar_action_${id}__');
|
||||
|
||||
static final dashboard = const Key('__dashboard__');
|
||||
static final loginScreen = const Key('__login_screen__');
|
||||
static final clientList = const Key('__client_list__');
|
||||
static final productHome = const Key('__product_home__');
|
||||
|
||||
static final productList = const Key('__product_list__');
|
||||
static final productItem = (int id) => Key('ProductItem__$id');
|
||||
static final productItemCheckbox = (int id) => Key('ProductItem__${id}__Checkbox');
|
||||
static final productItemProductKey = (int id) => Key('ProductItem__${id}__ProductKey');
|
||||
|
||||
static final detailsProductItemNote = Key('DetailsProduct__Note');
|
||||
static final productItem = (int id) => Key('__product_item_${id}__');
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:invoiceninja/routes.dart';
|
||||
import 'package:invoiceninja/data/models/entities.dart';
|
||||
import 'package:invoiceninja/utils/localization.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
|
||||
class CustomDrawer extends StatelessWidget {
|
||||
final List<CompanyEntity> companies;
|
||||
|
|
@ -64,7 +65,7 @@ class CustomDrawer extends StatelessWidget {
|
|||
color: Colors.white10,
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.dashboard),
|
||||
leading: Icon(FontAwesomeIcons.tachometerAlt),
|
||||
title: Text(AppLocalization.of(context).dashboard),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushReplacementNamed(AppRoutes.dashboard);
|
||||
|
|
@ -81,7 +82,7 @@ class CustomDrawer extends StatelessWidget {
|
|||
),
|
||||
*/
|
||||
ListTile(
|
||||
leading: Icon(Icons.language),
|
||||
leading: Icon(FontAwesomeIcons.cube),
|
||||
title: Text(AppLocalization.of(context).products),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushReplacementNamed(AppRoutes.products);
|
||||
|
|
@ -95,7 +96,7 @@ class CustomDrawer extends StatelessWidget {
|
|||
),
|
||||
*/
|
||||
ListTile(
|
||||
leading: Icon(Icons.power_settings_new),
|
||||
leading: Icon(FontAwesomeIcons.powerOff),
|
||||
title: Text(AppLocalization.of(context).logOut),
|
||||
onTap: () {
|
||||
while(Navigator.of(context).canPop()) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class ProductItem extends StatelessWidget {
|
|||
width: MediaQuery.of(context).size.width,
|
||||
child: Text(
|
||||
product.productKey,
|
||||
key: NinjaKeys.productItemProductKey(product.id),
|
||||
//key: NinjaKeys.productItemProductKey(product.id),
|
||||
style: Theme.of(context).textTheme.title,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -170,6 +170,13 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
font_awesome_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: font_awesome_flutter
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
front_end:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ dependencies:
|
|||
http: "^0.11.3+16"
|
||||
path_provider: "^0.4.0"
|
||||
shared_preferences: "^0.4.1"
|
||||
font_awesome_flutter: "^6.0.0"
|
||||
built_value: "^5.4.5"
|
||||
built_collection: "^3.1.1"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue