Skip to content

Commit

Permalink
Merge pull request #27 from JordyHers/dev
Browse files Browse the repository at this point in the history
merge dev to main
  • Loading branch information
JordyHers committed Apr 29, 2023
2 parents bcb189a + dc0e3f5 commit 935a97d
Show file tree
Hide file tree
Showing 60 changed files with 957 additions and 725 deletions.
82 changes: 47 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ class MyApp extends StatelessWidget {
return Container(
child: Column(
children: [
Image(image: Nba.atlantaHawks),
Image(image: Fashion.lvmh),
Image(image: Tech.lenovo),
Image(image: Food.nutella),
Image(image: Media.netflix),
...AnyLogo.nba.values.map((e) => e.image()).toList(),
...AnyLogo.fashion.values.map((e) => e.image()).toList(),
...AnyLogo.uefa.values.map((e) => e.image()).toList(),
...AnyLogo.food.values.map((e) => e.image()).toList(),
...AnyLogo.tech.values.map((e) => e.image()).toList(),
],
),
);
Expand All @@ -68,40 +68,52 @@ class MyApp extends StatelessWidget {

`flutter_any_logo` currently supports the following categories and logos:

### Media
### Usage
if you want to have access to a type a static method is available

- Instagram: `Media.instagram`
- Facebook: `Media.facebook`
- Twitter: `Media.twitter`
- TikTok: `Media.tiktok`

### Sports

- NBA: `Nba.atlanta`
- NFL: `Nfl.detroitLions`
- Football: `UEFA.barcelona`


### Tech

- Apple: `Tech.apple`
- Tesla: `Tech.tesla`
- Samsung: `Tech.samsung`
- Lenovo: `Tech.lenovo`

### Food

- Cocacola: `Food.cocaCola`
- Nutella: `Food.nutella`
- McDonalds: `Food.mcDonalds`
- Starbucks: `Food.starBucks`
```dart
// Single Assets Image NBA
AnyLogo.nba.atlantaHawks
//Access all values in a type
AnyLogo.nba.values
//Access the image
AnyLogo.nba.image()
// Key? key,
// AssetBundle? bundle,
// Widget Function(BuildContext, Widget, int?, bool)? frameBuilder,
// Widget Function(BuildContext, Object, StackTrace?)? errorBuilder,
// String? semanticLabel,
// bool excludeFromSemantics = false,
// double? scale,
// double? width,
// double? height,
// Color? color,
// Animation<double>? opacity,
// BlendMode? colorBlendMode,
// BoxFit? fit,
// AlignmentGeometry alignment = Alignment.center,
// ImageRepeat repeat = ImageRepeat.noRepeat,
// Rect? centerSlice,
// bool matchTextDirection = false,
// bool gaplessPlayback = false,
// bool isAntiAlias = false,
// String? package,
// FilterQuality filterQuality = FilterQuality.low,
// int? cacheWidth,
// int? cacheHeight,
// All the variables are sill available
AnyLogo.nba.image(height: 30);
//You can still pass just the asset image without calling [.image()]
Image(image: AssetImage(AnyLogo.nba.atlanta.path)),
### Fashion
- Louis Vuitton: `Fashion.lvmh`
- Dior: `Fashion.dior`
- Gucci: `Fashion.gucci`
```


## Test Strategy
Expand Down
File renamed without changes
File renamed without changes
Binary file added assets/food/dominosPizza.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/food/kfc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/food/pepsi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/food/pizzahut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
9 changes: 5 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ class _MyAppState extends State<MyApp> {
width: 200,
child: ListView(
children: [
...Nba.images,
...Media.images,
...Tech.images,
...UEFA.images,
...AnyLogo.nba.values.map((e) => e.image()).toList(),
...AnyLogo.fashion.values.map((e) => e.image()).toList(),
...AnyLogo.uefa.values.map((e) => e.image()).toList(),
...AnyLogo.food.values.map((e) => e.image()).toList(),
...AnyLogo.tech.values.map((e) => e.image()).toList(),
],
),
),
Expand Down
6 changes: 1 addition & 5 deletions lib/flutter_logo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
export 'package:flutter_any_logo/src/model/fashion/fashion.dart';
export 'package:flutter_any_logo/src/model/media/media.dart';
export 'package:flutter_any_logo/src/model/sports/basketball.dart';
export 'package:flutter_any_logo/src/model/sports/football.dart';
export 'package:flutter_any_logo/src/model/tech/tech.dart';
export 'package:flutter_any_logo/src/model/class.dart';
Loading

0 comments on commit 935a97d

Please sign in to comment.