forked from TheAlphamerc/flutter_ecommerce_app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix spelling errors and cleanup imports
- Loading branch information
Lloyd Luck
committed
May 12, 2020
1 parent
394719c
commit 626ac99
Showing
13 changed files
with
104 additions
and
108 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_ecommerce_app/src/model/category.dart'; | ||
import 'package:flutter_ecommerce_app/src/themes/light_color.dart'; | ||
import 'package:flutter_ecommerce_app/src/themes/theme.dart'; | ||
import 'package:flutter_ecommerce_app/src/wigets/title_text.dart'; | ||
|
||
class ProductIcon extends StatelessWidget { | ||
// final String imagePath; | ||
// final String text; | ||
// final bool isSelected; | ||
final Category model; | ||
ProductIcon({Key key, this.model}) : super(key: key); | ||
|
||
Widget build(BuildContext context) { | ||
return model.id == null | ||
? Container( | ||
width: 5, | ||
) | ||
: Container( | ||
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 15), | ||
padding: AppTheme.hPadding, | ||
alignment: Alignment.center, | ||
height: 40, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.all(Radius.circular(10)), | ||
color: | ||
model.isSelected ? LightColor.background : Colors.transparent, | ||
border: Border.all( | ||
color: model.isSelected ? LightColor.orange : LightColor.grey, | ||
width: model.isSelected ? 2 : 1), | ||
boxShadow: <BoxShadow>[ | ||
BoxShadow( | ||
color: model.isSelected ? Color(0xfffbf2ef) : Colors.white, | ||
blurRadius: 10, | ||
spreadRadius: 5, | ||
offset: Offset(5, 5)), | ||
], | ||
), | ||
child: Row( | ||
children: <Widget>[ | ||
model.image != null ? Image.asset(model.image) : SizedBox(), | ||
model.name == null | ||
? Container() | ||
: Container( | ||
child: TitleText( | ||
text: model.name, | ||
fontWeight: FontWeight.w700, | ||
fontSize: 15, | ||
), | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.