Browse Source

format code

Caijinglong 5 years ago
parent
commit
951fd56de3
3 changed files with 5 additions and 4 deletions
  1. 2
    1
      example/lib/main.dart
  2. 2
    1
      example/lib/preview.dart
  3. 1
    2
      lib/src/ui/page/photo_main_page.dart

+ 2
- 1
example/lib/main.dart View File

1
-import 'package:example/preview.dart';
2
 import 'package:flutter/cupertino.dart';
1
 import 'package:flutter/cupertino.dart';
3
 import 'package:flutter/material.dart';
2
 import 'package:flutter/material.dart';
4
 import 'package:photo/photo.dart';
3
 import 'package:photo/photo.dart';
5
 import 'package:photo_manager/photo_manager.dart';
4
 import 'package:photo_manager/photo_manager.dart';
6
 
5
 
6
+import './preview.dart';
7
+
7
 void main() => runApp(new MyApp());
8
 void main() => runApp(new MyApp());
8
 
9
 
9
 class MyApp extends StatelessWidget {
10
 class MyApp extends StatelessWidget {

+ 2
- 1
example/lib/preview.dart View File

1
-import 'package:example/asset_image.dart';
2
 import 'package:flutter/material.dart';
1
 import 'package:flutter/material.dart';
3
 import 'package:photo_manager/photo_manager.dart';
2
 import 'package:photo_manager/photo_manager.dart';
4
 
3
 
4
+import './asset_image.dart';
5
+
5
 class PreviewPage extends StatelessWidget {
6
 class PreviewPage extends StatelessWidget {
6
   final List<AssetEntity> list;
7
   final List<AssetEntity> list;
7
 
8
 

+ 1
- 2
lib/src/ui/page/photo_main_page.dart View File

361
   void _onGalleryChange(AssetPathEntity assetPathEntity) {
361
   void _onGalleryChange(AssetPathEntity assetPathEntity) {
362
     _currentPath = assetPathEntity;
362
     _currentPath = assetPathEntity;
363
 
363
 
364
-    _currentPath.assetList.then((v)async {
364
+    _currentPath.assetList.then((v) async {
365
       _sortAssetList(v);
365
       _sortAssetList(v);
366
       list.clear();
366
       list.clear();
367
       list.addAll(v);
367
       list.addAll(v);
500
     // Not deleted
500
     // Not deleted
501
     _onGalleryChange(this.currentPath);
501
     _onGalleryChange(this.currentPath);
502
   }
502
   }
503
-
504
 }
503
 }