Browse Source

format code

Caijinglong 5 years ago
parent
commit
1980dbd73e
1 changed files with 11 additions and 5 deletions
  1. 11
    5
      lib/src/ui/page/photo_main_page.dart

+ 11
- 5
lib/src/ui/page/photo_main_page.dart View File

26
   _PhotoMainPageState createState() => _PhotoMainPageState();
26
   _PhotoMainPageState createState() => _PhotoMainPageState();
27
 }
27
 }
28
 
28
 
29
-class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider, GalleryListProvider {
29
+class _PhotoMainPageState extends State<PhotoMainPage>
30
+    with SelectedProvider, GalleryListProvider {
30
   Options get options => ConfigProvider.of(context).options;
31
   Options get options => ConfigProvider.of(context).options;
31
 
32
 
32
   I18nProvider get i18nProvider => ConfigProvider.of(context).provider;
33
   I18nProvider get i18nProvider => ConfigProvider.of(context).provider;
93
                 splashColor: Colors.transparent,
94
                 splashColor: Colors.transparent,
94
                 child: Text(
95
                 child: Text(
95
                   i18nProvider.getSureText(options, selectedCount),
96
                   i18nProvider.getSureText(options, selectedCount),
96
-                  style: selectedCount == 0 ? textStyle.copyWith(color: options.disableColor) : textStyle,
97
+                  style: selectedCount == 0
98
+                      ? textStyle.copyWith(color: options.disableColor)
99
+                      : textStyle,
97
                 ),
100
                 ),
98
                 onPressed: selectedCount == 0 ? null : sure,
101
                 onPressed: selectedCount == 0 ? null : sure,
99
               ),
102
               ),
459
                   height: 44.0,
462
                   height: 44.0,
460
                   alignment: Alignment.center,
463
                   alignment: Alignment.center,
461
                   child: Text(
464
                   child: Text(
462
-                    i18nProvider.getPreviewText(options, widget.selectedProvider),
465
+                    i18nProvider.getPreviewText(
466
+                        options, widget.selectedProvider),
463
                     style: textStyle,
467
                     style: textStyle,
464
                   ),
468
                   ),
465
                   padding: textPadding,
469
                   padding: textPadding,
515
       future: entity.thumbDataWithSize(size, size),
519
       future: entity.thumbDataWithSize(size, size),
516
       builder: (BuildContext context, AsyncSnapshot<Uint8List> snapshot) {
520
       builder: (BuildContext context, AsyncSnapshot<Uint8List> snapshot) {
517
         var futureData = snapshot.data;
521
         var futureData = snapshot.data;
518
-        if (snapshot.connectionState == ConnectionState.done && futureData != null) {
522
+        if (snapshot.connectionState == ConnectionState.done &&
523
+            futureData != null) {
519
           ImageLruCache.setData(entity, size, futureData);
524
           ImageLruCache.setData(entity, size, futureData);
520
           return _buildImageItem(context, futureData);
525
           return _buildImageItem(context, futureData);
521
         }
526
         }
542
       future: entity.videoDuration,
547
       future: entity.videoDuration,
543
       builder: (ctx, snapshot) {
548
       builder: (ctx, snapshot) {
544
         if (snapshot.hasData && snapshot != null) {
549
         if (snapshot.hasData && snapshot != null) {
545
-          var buildBadge = badgeDelegate?.buildBadge(context, entity.type, snapshot.data);
550
+          var buildBadge =
551
+              badgeDelegate?.buildBadge(context, entity.type, snapshot.data);
546
           if (buildBadge == null) {
552
           if (buildBadge == null) {
547
             return Container();
553
             return Container();
548
           } else {
554
           } else {