Skip to content

Commit

Permalink
✨ 图片使用webp
Browse files Browse the repository at this point in the history
  • Loading branch information
toly1994328 committed Sep 1, 2020
1 parent f42b9e0 commit 3643ede
Show file tree
Hide file tree
Showing 180 changed files with 145 additions and 145 deletions.
Binary file modified assets/flutter.db
Binary file not shown.
Binary file removed assets/images/caver.jpeg
Binary file not shown.
Binary file added assets/images/caver.webp
Binary file not shown.
Binary file removed assets/images/dart.jpg
Binary file not shown.
Binary file added assets/images/dart.webp
Binary file not shown.
Binary file removed assets/images/head_icon/icon_5.jpg
Binary file not shown.
Binary file added assets/images/head_icon/icon_5.webp
Binary file not shown.
Binary file removed assets/images/head_icon/icon_6.jpg
Binary file not shown.
Binary file added assets/images/head_icon/icon_6.webp
Binary file not shown.
Binary file removed assets/images/head_icon/icon_7.jpg
Binary file not shown.
Binary file added assets/images/head_icon/icon_7.webp
Binary file not shown.
Binary file removed assets/images/head_icon/icon_8.jpg
Binary file not shown.
Binary file added assets/images/head_icon/icon_8.webp
Binary file not shown.
Binary file removed assets/images/icon_head.png
Binary file not shown.
Binary file added assets/images/icon_head.webp
Binary file not shown.
Binary file removed assets/images/java.jpeg
Binary file not shown.
Binary file added assets/images/java.webp
Binary file not shown.
Binary file removed assets/images/kotlin.jpg
Binary file not shown.
Binary file added assets/images/kotlin.webp
Binary file not shown.
Binary file removed assets/images/leaf.png
Binary file not shown.
Binary file added assets/images/leaf.webp
Binary file not shown.
Binary file removed assets/images/sabar.jpg
Binary file not shown.
Binary file added assets/images/sabar.webp
Binary file not shown.
Binary file removed assets/images/sabar_bar.jpg
Binary file not shown.
Binary file added assets/images/sabar_bar.webp
Binary file not shown.
Binary file removed assets/images/wechat.jpg
Binary file not shown.
Binary file added assets/images/wechat.webp
Binary file not shown.
Binary file removed assets/images/widgets/ActionChip.png
Binary file not shown.
Binary file added assets/images/widgets/ActionChip.webp
Binary file not shown.
Binary file removed assets/images/widgets/Banner.png
Binary file not shown.
Binary file added assets/images/widgets/Banner.webp
Binary file not shown.
Binary file removed assets/images/widgets/Card.png
Binary file not shown.
Binary file added assets/images/widgets/Card.webp
Binary file not shown.
Binary file removed assets/images/widgets/CheckBoxListTile.png
Binary file not shown.
Binary file added assets/images/widgets/CheckBoxListTile.webp
Binary file not shown.
Binary file removed assets/images/widgets/Chip.png
Binary file not shown.
Binary file added assets/images/widgets/Chip.webp
Binary file not shown.
Binary file removed assets/images/widgets/ChoiceChip.png
Binary file not shown.
Binary file added assets/images/widgets/ChoiceChip.webp
Binary file not shown.
Binary file removed assets/images/widgets/Container.png
Binary file not shown.
Binary file added assets/images/widgets/Container.webp
Binary file not shown.
Binary file removed assets/images/widgets/FilterChip.png
Binary file not shown.
Binary file added assets/images/widgets/FilterChip.webp
Binary file not shown.
Binary file removed assets/images/widgets/FlutterLogo.png
Binary file not shown.
Binary file added assets/images/widgets/FlutterLogo.webp
Binary file not shown.
Binary file removed assets/images/widgets/GridTile.png
Binary file not shown.
Binary file added assets/images/widgets/GridTile.webp
Binary file not shown.
Binary file removed assets/images/widgets/GridTileBar.png
Binary file not shown.
Binary file added assets/images/widgets/GridTileBar.webp
Binary file not shown.
Binary file removed assets/images/widgets/Icon.png
Binary file not shown.
Binary file added assets/images/widgets/Icon.webp
Binary file not shown.
Binary file removed assets/images/widgets/ImageIcon.png
Diff not rendered.
Binary file added assets/images/widgets/ImageIcon.webp
Binary file not shown.
Binary file removed assets/images/widgets/InputChip.png
Diff not rendered.
Binary file added assets/images/widgets/InputChip.webp
Binary file not shown.
Binary file removed assets/images/widgets/ListTile.png
Diff not rendered.
Binary file added assets/images/widgets/ListTile.webp
Binary file not shown.
Binary file removed assets/images/widgets/RadioListTile.png
Diff not rendered.
Binary file added assets/images/widgets/RadioListTile.webp
Binary file not shown.
Binary file removed assets/images/widgets/SwitchListTile.png
Diff not rendered.
Binary file added assets/images/widgets/SwitchListTile.webp
Binary file not shown.
Binary file removed assets/images/widgets/Text.png
Diff not rendered.
Binary file added assets/images/widgets/Text.webp
Binary file not shown.
Binary file removed assets/images/widgets/UserAccountsDrawerHeader.png
Diff not rendered.
Binary file not shown.
Binary file removed assets/images/widgets/Visibility.png
Diff not rendered.
Binary file added assets/images/widgets/Visibility.webp
Binary file not shown.
Binary file removed assets/images/wy_200x300.jpg
Diff not rendered.
Binary file added assets/images/wy_200x300.webp
Binary file not shown.
Binary file removed assets/images/wy_300x200.jpg
Diff not rendered.
Binary file added assets/images/wy_300x200.webp
Binary file not shown.
Binary file removed assets/images/wy_300x200_filter.jpg
Diff not rendered.
Binary file added assets/images/wy_300x200_filter.webp
Binary file not shown.
Binary file removed assets/images/wy_30x20.jpg
Diff not rendered.
Binary file added assets/images/wy_30x20.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/views/app/splash/unit_splash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class _UnitSplashState extends State<UnitSplash> with TickerProviderStateMixin {
child: Container(
height: 45,
width: 45,
child: Image.asset('assets/images/icon_head.png'),
child: Image.asset('assets/images/icon_head.webp'),
));

Widget _buildPower() => Positioned(
Expand Down
2 changes: 1 addition & 1 deletion lib/views/common/unit_drawer_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class UnitDrawerHeader extends StatelessWidget {
padding: EdgeInsets.only(top: 10, left: 15),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/wy_300x200_filter.jpg'),
image: AssetImage('assets/images/wy_300x200_filter.webp'),
fit: BoxFit.cover),
),
child: Column(
Expand Down
2 changes: 1 addition & 1 deletion lib/views/dialogs/dialog_about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DialogAbout extends StatelessWidget {
//标题
children: <Widget>[
Image.asset(
"assets/images/icon_head.png",
"assets/images/icon_head.webp",
width: 30,
height: 30,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/about/about_app_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AboutAppPage extends StatelessWidget {
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(bottom: 50),
child: Image.asset(
'assets/images/sabar.jpg',
'assets/images/sabar.webp',
fit: BoxFit.cover,
),
),
Expand All @@ -42,7 +42,7 @@ class AboutAppPage extends StatelessWidget {
child: CircleImage(
size: 100,
shadowColor: Theme.of(context).primaryColor,
image: AssetImage('assets/images/icon_head.png'),
image: AssetImage('assets/images/icon_head.webp'),
)),
],
),
Expand Down
6 changes: 3 additions & 3 deletions lib/views/pages/about/about_me_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AboutMePage extends StatelessWidget {
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(bottom: 50),
child: Image.asset(
'assets/images/sabar.jpg',
'assets/images/sabar.webp',
fit: BoxFit.cover,
),
),
Expand All @@ -38,7 +38,7 @@ class AboutMePage extends StatelessWidget {
child: CircleImage(
size: 100,
shadowColor: Theme.of(context).primaryColor,
image: AssetImage('assets/images/icon_head.png'),
image: AssetImage('assets/images/icon_head.webp'),
)),
],
),
Expand Down Expand Up @@ -140,7 +140,7 @@ class AboutMePage extends StatelessWidget {
width: 190,
child: Column(
children: <Widget>[
Image.asset('assets/images/wechat.jpg'),
Image.asset('assets/images/wechat.webp'),
Text(
'我的微信',
style: TextStyle(fontSize: 16),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/about/version_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class VersionInfo extends StatelessWidget {
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 10,
children: <Widget>[
CircleImage(image: AssetImage("assets/images/icon_head.png"),size: 80,),
CircleImage(image: AssetImage("assets/images/icon_head.webp"),size: 80,),
Text('Flutter Unit',style: TextStyle(fontSize: 20,fontWeight: FontWeight.bold),),
Text('Version ${Cons.version}'),
],
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/category/collect_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class _CollectPageState extends State<CollectPage>
Navigator.of(context).pushNamed(UnitRouter.login);
},
child: CircleImage(
image: AssetImage('assets/images/icon_head.png'),
image: AssetImage('assets/images/icon_head.webp'),
borderSize: 1.5,
),
)),
Expand All @@ -80,7 +80,7 @@ class _CollectPageState extends State<CollectPage>
flexibleSpace: FlexibleSpaceBar(
collapseMode: CollapseMode.parallax, //视差效果
background: Image.asset(
"assets/images/caver.jpeg",
"assets/images/caver.webp",
fit: BoxFit.cover,
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/detail/widget_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class WidgetDetailTitle extends StatelessWidget {
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(8)),
child: model.image == null
? Image.asset('assets/images/caver.jpeg')
? Image.asset('assets/images/caver.webp')
: Image(image: model.image))),
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/home/background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Background extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: const AssetImage('assets/images/sabar.jpg'),
image: const AssetImage('assets/images/sabar.webp'),
fit: BoxFit.cover),
borderRadius: const BorderRadius.only(
bottomRight: const Radius.circular(400),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/login/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class LoginPage extends StatelessWidget {

Widget arcBackground() {
return ArcBackground(
image: AssetImage("assets/images/caver.jpeg"),
image: AssetImage("assets/images/caver.webp"),
child: Padding(
padding: const EdgeInsets.all(50.0),
child: Container(
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/unit_todo/attr_unit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AttrUnitPage extends StatelessWidget {
child: Column(
children: <Widget>[
CircleImage(
image: AssetImage('assets/images/icon_head.png'),
image: AssetImage('assets/images/icon_head.webp'),
size: 80,
),
SizedBox(height: 10,),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/unit_todo/layout_unit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LayoutUnitPage extends StatelessWidget {
child: Column(
children: <Widget>[
CircleImage(
image: AssetImage('assets/images/icon_head.png'),
image: AssetImage('assets/images/icon_head.webp'),
size: 80,
),
SizedBox(height: 10,),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/unit_todo/paint_unit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PaintUnitPage extends StatelessWidget {
child: Column(
children: <Widget>[
CircleImage(
image: AssetImage('assets/images/icon_head.png'),
image: AssetImage('assets/images/icon_head.webp'),
size: 80,
),
SizedBox(height: 10,),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/unit_todo/point_unit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class BugUnitPage extends StatelessWidget {
Navigator.of(context).pushNamed(UnitRouter.issues_point);
},
child: CircleImage(
image: AssetImage('assets/images/icon_head.png'),
image: AssetImage('assets/images/icon_head.webp'),
size: 80,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class CircleFlow extends StatelessWidget {
final data = List.generate(
16,
(index) => index.isEven
? "assets/images/icon_head.png"
: "assets/images/wy_300x200.jpg");
? "assets/images/icon_head.webp"
: "assets/images/wy_300x200.webp");

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class BurstFlow extends StatefulWidget {
static final data = List.generate(
16,
(index) => index.isEven
? "assets/images/icon_head.png"
: "assets/images/wy_300x200.jpg");
? "assets/images/icon_head.webp"
: "assets/images/wy_300x200.webp");
static final show = Container(
width: 300,
height: 300,
Expand All @@ -27,7 +27,7 @@ class BurstFlow extends StatefulWidget {
.map((e) => CircleAvatar(backgroundImage: AssetImage(e)))
.toList(),
menu: CircleAvatar(
backgroundImage: AssetImage('assets/images/icon_head.png'),
backgroundImage: AssetImage('assets/images/icon_head.webp'),
)));

final List<Widget> children;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RichTextWithWidget extends StatelessWidget {
children: <InlineSpan>[
WidgetSpan(
child: Image.asset(
'assets/images/icon_head.png',
'assets/images/icon_head.webp',
width: 30,
),
alignment: PlaceholderAlignment.baseline,
Expand Down
2 changes: 1 addition & 1 deletion lib/views/widgets/Other/RawImage/node1_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class _RawImageDemoState extends State<RawImageDemo> {
@override
void initState() {
super.initState();
_loadImageFromAssets('assets/images/icon_head.png');
_loadImageFromAssets('assets/images/icon_head.webp');
}

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class _ListTileSimpleState extends State<_ListTileSimple> {
margin: EdgeInsets.all(10),
color: Colors.grey.withAlpha(22),
child: ListTile(
leading: Image.asset("assets/images/icon_head.png"),
leading: Image.asset("assets/images/icon_head.webp"),
selected: _selected,
title: Text("以梦为马"),
subtitle: Text("海子"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ class _CustomBackdropFilterState extends State<CustomBackdropFilter> {
height: 150,
width: 150,
child: Image.asset(
'assets/images/sabar.jpg',
'assets/images/sabar.webp',
fit: BoxFit.cover,
),
),
Container(
height: 150,
width: 150,
child: Image.asset(
'assets/images/wy_200x300.jpg',
'assets/images/wy_200x300.webp',
fit: BoxFit.cover,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class CustomClipOval extends StatelessWidget {
ClipOval(

child: Image.asset(
"assets/images/wy_300x200.jpg",
"assets/images/wy_300x200.webp",
width: 150,
height: 100,
),
),
ClipOval(
child: Image.asset(
"assets/images/wy_300x200.jpg",
"assets/images/wy_300x200.webp",
width: 100,
height: 100,
fit: BoxFit.cover,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CustomClipPath extends StatelessWidget {
return ClipPath(
clipper: ShapeBorderClipper(shape: _StarShapeBorder()),
child: Image.asset(
"assets/images/wy_300x200.jpg",
"assets/images/wy_300x200.webp",
width: 150,
height: 100,
fit: BoxFit.cover,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CustomClipRRect extends StatelessWidget {
return ClipRRect(
borderRadius: BorderRadius.all(Radius.elliptical(35, 30)),
child: Image.asset(
"assets/images/wy_300x200.jpg",
"assets/images/wy_300x200.webp",
width: 150,
height: 100,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CustomClipRect extends StatelessWidget {
height: 100,
width: 100,
child: Image.asset(
"assets/images/wy_300x200.jpg",
"assets/images/wy_300x200.webp",
fit: BoxFit.cover,),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class _CustomColorFilteredState extends State<CustomColorFiltered> {
width: 58,
height: 58,
child: ColorFiltered(
child: Image(image: AssetImage("assets/images/icon_head.png")),
child: Image(image: AssetImage("assets/images/icon_head.webp")),
colorFilter: ColorFilter.mode(_color, m)),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ShapeImageDemo extends StatelessWidget {
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/images/wy_200x300.jpg',
'assets/images/wy_200x300.webp',
))),
child: SizedBox(
height: 80,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BorderDemo extends StatelessWidget {
height: 80,
width: 100,
child: Image.asset(
'assets/images/wy_200x300.jpg',
'assets/images/wy_200x300.webp',
fit: BoxFit.cover,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ShapeDecorationDemo extends StatelessWidget {
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/images/wy_200x300.jpg',
'assets/images/wy_200x300.webp',
)),
shape: CircleBorder(
side: BorderSide(width: 1.0, color: Colors.orangeAccent),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class _CustomOpacityState extends State<CustomOpacity> {
Widget _buildOpacity() => Opacity(
opacity: _opacity,
child: Image.asset(// 图片
'assets/images/icon_head.png',
'assets/images/icon_head.webp',
width: 100,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PhysicalModelDemo extends StatelessWidget{
shadowColor: Colors.orange,
elevation: 3,
child: Image.asset(
'assets/images/caver.jpeg',
'assets/images/caver.webp',
fit: BoxFit.cover,
),
clipBehavior: Clip.hardEdge,
Expand All @@ -44,7 +44,7 @@ class PhysicalModelDemo extends StatelessWidget{
shadowColor: Colors.orange,
elevation: 3,
child: Image.asset(
'assets/images/caver.jpeg',
'assets/images/caver.webp',
fit: BoxFit.cover,
),
borderRadius: BorderRadius.all(Radius.circular(20)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PhysicalShapeDemo extends StatelessWidget {
shadowColor: Colors.orange,
elevation: 3,
child: Image.asset(
'assets/images/caver.jpeg',
'assets/images/caver.webp',
fit: BoxFit.cover,
),
clipBehavior: Clip.hardEdge,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RadialShaderMask extends StatelessWidget {
ShaderMask(
shaderCallback: _buildShader,
child: Image.asset(
'assets/images/icon_head.png',
'assets/images/icon_head.webp',
height: 70,
width: 70,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class LinearShaderMask extends StatelessWidget {
ShaderMask(
shaderCallback: _buildShader,
child: Image.asset(
'assets/images/icon_head.png',
'assets/images/icon_head.webp',
height: 70,
width: 70,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class _SkewTransformState extends State<SkewTransform> {
width: 100,
height: 100,
child: Image.asset(
'assets/images/wy_300x200.jpg',
'assets/images/wy_300x200.webp',
fit: BoxFit.cover,
)),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class _TranslationTransformState extends State<TranslationTransform> {
width: 100,
height: 100,
child: Image.asset(
'assets/images/wy_300x200.jpg',
'assets/images/wy_300x200.webp',
fit: BoxFit.cover,
)),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class _ScaleTransformState extends State<ScaleTransform> {
width: 100,
height: 100,
child: Image.asset(
'assets/images/wy_300x200.jpg',
'assets/images/wy_300x200.webp',
fit: BoxFit.cover,
)),
);
Expand Down
Loading

0 comments on commit 3643ede

Please sign in to comment.