Skip to content

Commit

Permalink
Refactored assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed May 2, 2021
1 parent 2ef60eb commit 4946170
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
18 changes: 9 additions & 9 deletions lib/model/default_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ import 'package:hds_overlay/hive/data_type.dart';
String getDefaultImage(DataType dataType) {
switch (dataType) {
case DataType.heartRate:
return 'assets/hrImage.png';
return 'assets/images/hrImage.png';
case DataType.calories:
return 'assets/calImage.gif';
return 'assets/images/calImage.gif';
case DataType.heartRateMin:
return 'assets/hrImage.png';
return 'assets/images/hrImage.png';
case DataType.heartRateMax:
return 'assets/hrImage.png';
return 'assets/images/hrImage.png';
case DataType.heartRateAverage:
return 'assets/hrImage.png';
return 'assets/images/hrImage.png';
case DataType.stepCount:
return 'assets/stepImage.png';
return 'assets/images/stepImage.png';
case DataType.distanceTraveled:
return 'assets/distanceImage.png';
return 'assets/images/distanceImage.png';
case DataType.speed:
return 'assets/speedImage.png';
return 'assets/images/speedImage.png';
case DataType.unknown:
print('Tried to load default image for DataType.unknown');
return 'assets/icon.png';
return 'assets/images/icon.png';
}
}
Empty file.
2 changes: 1 addition & 1 deletion lib/view/widgets/drawers/navigation_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final navigationDrawer = Drawer(
style: TextStyle(color: Colors.white),
),
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage('assets/icon.png')),
image: DecorationImage(image: AssetImage('assets/images/icon.png')),
color: Colors.grey,
),
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ flutter:

# To add assets to your application, add an assets section, like this:
assets:
- assets/
- assets/images/
- pubspec.yaml

# An image asset can refer to one or more resolution-specific "variants", see
Expand Down

0 comments on commit 4946170

Please sign in to comment.