Skip to content

Commit

Permalink
Merge pull request #61 from fluttercandies/dev
Browse files Browse the repository at this point in the history
update demo
  • Loading branch information
zmtzawqlp authored Mar 26, 2020
2 parents f42f8d3 + 45f83f6 commit e3a326e
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 136 deletions.
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_saver","path":"C:\\\\Users\\\\hll\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\image_picker_saver-0.3.0\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\hll\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider-1.6.0\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\hll\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher-5.3.0\\\\","dependencies":[]}],"android":[{"name":"image_picker_saver","path":"C:\\\\Users\\\\hll\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\image_picker_saver-0.3.0\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\hll\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider-1.6.0\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\hll\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher-5.3.0\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"url_launcher_web","path":"C:\\\\Users\\\\hll\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_web-0.1.0+2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"image_picker_saver","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web"]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-02-05 19:25:44.490791","version":"1.14.6"}
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"image_picker_saver","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web"]},{"name":"url_launcher_web","dependencies":[]}]}
1 change: 1 addition & 0 deletions example/ff_annotation_route_commands
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-rh, -rn
6 changes: 3 additions & 3 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\zmt\flutter\dev"
export "FLUTTER_APPLICATION_PATH=D:\zmt\FlutterCandies\dev\extended_text_field\example"
export "FLUTTER_ROOT=E:\Flutter\flutter_source\1.12.13"
export "FLUTTER_APPLICATION_PATH=E:\Flutter\FlutterCandies\dev\extended_text_field\example"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_FRAMEWORK_DIR=D:\zmt\flutter\dev\bin\cache\artifacts\engine\ios"
export "FLUTTER_FRAMEWORK_DIR=E:\Flutter\flutter_source\1.12.13\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
55 changes: 29 additions & 26 deletions example/lib/example_route.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

159 changes: 90 additions & 69 deletions example/lib/example_route_helper.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:extended_image/extended_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_candies_demo_library/flutter_candies_demo_library.dart';
import 'package:oktoast/oktoast.dart';

Expand All @@ -28,19 +27,6 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
navigatorObservers: [
FFNavigatorObserver(routeChange: (name) {
//you can track page here
// print(name);
}, showStatusBarChange: (bool showStatusBar) {
if (showStatusBar) {
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);
} else {
SystemChrome.setEnabledSystemUIOverlays([]);
}
})
],
builder: (c, w) {
ScreenUtil.init(width: 750, height: 1334, allowFontScaling: true);
// ScreenUtil.instance =
Expand Down
14 changes: 12 additions & 2 deletions example/lib/pages/pic_swiper_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,28 @@ import 'package:flutter_candies_demo_library/flutter_candies_demo_library.dart';
@FFRoute(
name: "fluttercandies://picswiper",
routeName: "PicSwiper",
argumentNames: ["index", "pics"],
argumentNames: [
"index",
"pics",
"tuChongItem",
],
showStatusBar: false,
pageRouteType: PageRouteType.transparent)
class PicSwiperPage extends StatelessWidget {
final int index;
final List<PicSwiperItem> pics;
PicSwiperPage({this.index, this.pics});
final TuChongItem tuChongItem;
PicSwiperPage({
this.index,
this.pics,
this.tuChongItem,
});
@override
Widget build(BuildContext context) {
return PicSwiper(
index: index,
pics: pics,
tuChongItem: tuChongItem,
);
}
}
8 changes: 5 additions & 3 deletions example/lib/pages/text_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,16 @@ class _TextDemoState extends State<TextDemo> {
}
//image
else {
final item = images
.firstWhere((x) => x.imageUrl == value.toString());
Navigator.pushNamed(context, "fluttercandies://picswiper",
arguments: {
"index": images.indexOf(images.firstWhere(
(x) => x.imageUrl == value.toString())),
"pics": images
"index": images.indexOf(item),
"pics": item.images
.map<PicSwiperItem>((f) => PicSwiperItem(
picUrl: f.imageUrl, des: f.title))
.toList(),
'tuChongItem': item,
});
}
},
Expand Down
Loading

0 comments on commit e3a326e

Please sign in to comment.