ID_CARD_PROVINCE_DICT = [
+ '11=北京',
+ '12=天津',
+ '13=河北',
+ '14=山西',
+ '15=内蒙古',
+ '21=辽宁',
+ '22=吉林',
+ '23=黑龙江',
+ '31=上海',
+ '32=江苏',
+ '33=浙江',
+ '34=安徽',
+ '35=福建',
+ '36=江西',
+ '37=山东',
+ '41=河南',
+ '42=湖北',
+ '43=湖南',
+ '44=广东',
+ '45=广西',
+ '46=海南',
+ '50=重庆',
+ '51=四川',
+ '52=贵州',
+ '53=云南',
+ '54=西藏',
+ '61=陕西',
+ '62=甘肃',
+ '63=青海',
+ '64=宁夏',
+ '65=新疆',
+ '71=台湾老',
+ '81=香港',
+ '82=澳门',
+ '83=台湾新',
+ '91=国外',
+];
+
+/// Regex Util.
+class RegexUtil {
+ /// Regex of simple mobile.
+ static final String regexMobileSimple = '^[1]\\d{10}\$';
+
+ /// Regex of exact mobile.
+ /// china mobile: 134(0-8), 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 165, 172, 178, 182, 183, 184, 187, 188, 195, 198
+ /// china unicom: 130, 131, 132, 145, 155, 156, 166, 167, 171, 175, 176, 185, 186
+ /// china telecom: 133, 153, 162, 173, 177, 180, 181, 189, 199, 191
+ /// global star: 1349
+ /// virtual operator: 170
+ static final String regexMobileExact =
+ '^((13[0-9])|(14[57])|(15[0-35-9])|(16[2567])|(17[01235-8])|(18[0-9])|(19[1589]))\\d{8}\$';
+
+ /// Regex of telephone number.
+ static final String regexTel = '^0\\d{2,3}[- ]?\\d{7,8}';
+
+ /// Regex of id card number which length is 15.
+ static final String regexIdCard15 =
+ '^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}\$';
+
+ /// Regex of id card number which length is 18.
+ static final String regexIdCard18 =
+ '^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9Xx])\$';
+
+ /// Regex of email.
+ static final String regexEmail =
+ '^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$';
+
+ /// Regex of url.
+ static final String regexUrl = '[a-zA-Z]+://[^\\s]*';
+
+ /// Regex of Chinese character.
+ static final String regexZh = '[\\u4e00-\\u9fa5]';
+
+ /// Regex of date which pattern is 'yyyy-MM-dd'.
+ static final String regexDate =
+ '^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)\$';
+
+ /// Regex of ip address.
+ static final String regexIp =
+ '((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)';
+
+ /// must contain letters and numbers, 6 ~ 18.
+ /// 必须包含字母和数字, 6~18.
+ static const String regexUsername =
+ '^(?![0-9]+\$)(?![a-zA-Z]+\$)[0-9A-Za-z]{6,18}\$';
+
+ /// must contain letters and numbers, can contain special characters 6 ~ 18.
+ /// 必须包含字母和数字,可包含特殊字符 6~18.
+ static const String regexUsername2 =
+ '^(?![0-9]+\$)(?![a-zA-Z]+\$)[0-9A-Za-z\\W]{6,18}\$';
+
+ /// must contain letters and numbers and special characters, 6 ~ 18.
+ /// 必须包含字母和数字和殊字符, 6~18.
+ static const String regexUsername3 =
+ '^(?![0-9]+\$)(?![a-zA-Z]+\$)(?![0-9a-zA-Z]+\$)(?![0-9\\W]+\$)(?![a-zA-Z\\W]+\$)[0-9A-Za-z\\W]{6,18}\$';
+
+ /// Regex of QQ number.
+ static final String regexQQ = '[1-9][0-9]{4,}';
+
+ /// Regex of postal code in China.
+ static final String regexChinaPostalCode = "[1-9]\\d{5}(?!\\d)";
+
+ /// Regex of Passport.
+ static final String regexPassport =
+ r'(^[EeKkGgDdSsPpHh]\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\d{7}$)';
+
+ static final Map cityMap = Map();
+
+ ///Return whether input matches regex of simple mobile.
+ static bool isMobileSimple(String input) {
+ return matches(regexMobileSimple, input);
+ }
+
+ ///Return whether input matches regex of exact mobile.
+ static bool isMobileExact(String input) {
+ return matches(regexMobileExact, input);
+ }
+
+ /// Return whether input matches regex of telephone number.
+ static bool isTel(String input) {
+ return matches(regexTel, input);
+ }
+
+ /// Return whether input matches regex of id card number.
+ static bool isIDCard(String input) {
+ if (input.length == 15) {
+ return isIDCard15(input);
+ }
+ if (input.length == 18) {
+ return isIDCard18Exact(input);
+ }
+ return false;
+ }
+
+ /// Return whether input matches regex of id card number which length is 15.
+ static bool isIDCard15(String input) {
+ return matches(regexIdCard15, input);
+ }
+
+ /// Return whether input matches regex of id card number which length is 18.
+ static bool isIDCard18(String input) {
+ return matches(regexIdCard18, input);
+ }
+
+ ///Return whether input matches regex of exact id card number which length is 18.
+ static bool isIDCard18Exact(String input) {
+ if (isIDCard18(input)) {
+ List factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
+ List suffix = [
+ '1',
+ '0',
+ 'X',
+ '9',
+ '8',
+ '7',
+ '6',
+ '5',
+ '4',
+ '3',
+ '2'
+ ];
+ if (cityMap.isEmpty) {
+ List list = ID_CARD_PROVINCE_DICT;
+ List> mapEntryList = [];
+ for (int i = 0, length = list.length; i < length; i++) {
+ List tokens = list[i].trim().split('=');
+ MapEntry mapEntry = MapEntry(tokens[0], tokens[1]);
+ mapEntryList.add(mapEntry);
+ }
+ cityMap.addEntries(mapEntryList);
+ }
+ if (cityMap[input.substring(0, 2)] != null) {
+ int weightSum = 0;
+ for (int i = 0; i < 17; ++i) {
+ weightSum += (input.codeUnitAt(i) - '0'.codeUnitAt(0)) * factor[i];
+ }
+ int idCardMod = weightSum % 11;
+ String idCardLast = String.fromCharCode(input.codeUnitAt(17));
+ return idCardLast == suffix[idCardMod];
+ }
+ }
+ return false;
+ }
+
+ /// Return whether input matches regex of email.
+ static bool isEmail(String input) {
+ return matches(regexEmail, input);
+ }
+
+ /// Return whether input matches regex of url.
+ static bool isURL(String input) {
+ return matches(regexUrl, input);
+ }
+
+ /// Return whether input matches regex of Chinese character.
+ static bool isZh(String input) {
+ return '〇' == input || matches(regexZh, input);
+ }
+
+ /// Return whether input matches regex of date which pattern is 'yyyy-MM-dd'.
+ static bool isDate(String input) {
+ return matches(regexDate, input);
+ }
+
+ /// Return whether input matches regex of ip address.
+ static bool isIP(String input) {
+ return matches(regexIp, input);
+ }
+
+ /// Return whether input matches regex of username.
+ static bool isUserName(String input, {String regex = regexUsername}) {
+ return matches(regex, input);
+ }
+
+ /// Return whether input matches regex of QQ.
+ static bool isQQ(String input) {
+ return matches(regexQQ, input);
+ }
+
+ ///Return whether input matches regex of Passport.
+ static bool isPassport(String input) {
+ return matches(regexPassport, input);
+ }
+
+ static bool matches(String regex, String input) {
+ if (input.isEmpty) return false;
+ return RegExp(regex).hasMatch(input);
+ }
+}
diff --git a/FlutterHelper/common_utils/lib/src/text_util.dart b/FlutterHelper/common_utils/lib/src/text_util.dart
new file mode 100644
index 00000000..3931767f
--- /dev/null
+++ b/FlutterHelper/common_utils/lib/src/text_util.dart
@@ -0,0 +1,83 @@
+/**
+ * @Author: Sky24n
+ * @GitHub: https://github.com/Sky24n
+ * @Description: Text Util.
+ * @Date: 2019/7/9
+ */
+
+/// Text Util.
+class TextUtil {
+ /// isEmpty
+ static bool isEmpty(String? text) {
+ return text == null || text.isEmpty;
+ }
+
+ /// 每隔 x位 加 pattern
+ static String formatDigitPattern(String text,
+ {int digit = 4, String pattern = ' '}) {
+ text = text.replaceAllMapped(RegExp('(.{$digit})'), (Match match) {
+ return '${match.group(0)}$pattern';
+ });
+ if (text.endsWith(pattern)) {
+ text = text.substring(0, text.length - 1);
+ }
+ return text;
+ }
+
+ /// 每隔 x位 加 pattern, 从末尾开始
+ static String formatDigitPatternEnd(String text,
+ {int digit = 4, String pattern = ' '}) {
+ String temp = reverse(text);
+ temp = formatDigitPattern(temp, digit: digit, pattern: pattern);
+ temp = reverse(temp);
+ return temp;
+ }
+
+ /// 每隔4位加空格
+ static String formatSpace4(String text) {
+ return formatDigitPattern(text);
+ }
+
+ /// 每隔3三位加逗号
+ /// num 数字或数字字符串。int型。
+ static String formatComma3(Object num) {
+ return formatDigitPatternEnd(num.toString(), digit: 3, pattern: ',');
+ }
+
+ /// 每隔3三位加逗号
+ /// num 数字或数字字符串。double型。
+ static String formatDoubleComma3(Object num,
+ {int digit = 3, String pattern = ','}) {
+ List list = num.toString().split('.');
+ String left =
+ formatDigitPatternEnd(list[0], digit: digit, pattern: pattern);
+ String right = list[1];
+ return '$left.$right';
+ }
+
+ /// hideNumber
+ static String hideNumber(String phoneNo,
+ {int start = 3, int end = 7, String replacement = '****'}) {
+ return phoneNo.replaceRange(start, end, replacement);
+ }
+
+ /// replace
+ static String replace(String text, Pattern from, String replace) {
+ return text.replaceAll(from, replace);
+ }
+
+ /// split
+ static List split(String text, Pattern pattern) {
+ return text.split(pattern);
+ }
+
+ /// reverse
+ static String reverse(String text) {
+ if (isEmpty(text)) return '';
+ StringBuffer sb = StringBuffer();
+ for (int i = text.length - 1; i >= 0; i--) {
+ sb.writeCharCode(text.codeUnitAt(i));
+ }
+ return sb.toString();
+ }
+}
diff --git a/FlutterHelper/common_utils/lib/src/timeline_util.dart b/FlutterHelper/common_utils/lib/src/timeline_util.dart
new file mode 100644
index 00000000..85c07c7f
--- /dev/null
+++ b/FlutterHelper/common_utils/lib/src/timeline_util.dart
@@ -0,0 +1,374 @@
+import 'package:common_utils/src/date_util.dart';
+
+/**
+ * @Author: Sky24n
+ * @GitHub: https://github.com/Sky24n
+ * @Description: Timeline Util.
+ * @Date: 2018/10/3
+ */
+
+/// (xx)Configurable output.
+/// (xx)为可配置输出.
+enum DayFormat {
+ /// (less than 10s->just now)、x minutes、x hours、(Yesterday)、x days.
+ /// (小于10s->刚刚)、x分钟、x小时、(昨天)、x天.
+ Simple,
+
+ /// (less than 10s->just now)、x minutes、x hours、[This year:(Yesterday/a day ago)、(two days age)、MM-dd ]、[past years: yyyy-MM-dd]
+ /// (小于10s->刚刚)、x分钟、x小时、[今年: (昨天/1天前)、(2天前)、MM-dd],[往年: yyyy-MM-dd].
+ Common,
+
+ /// 日期 + HH:mm
+ /// (less than 10s->just now)、x minutes、x hours、[This year:(Yesterday HH:mm/a day ago)、(two days age)、MM-dd HH:mm]、[past years: yyyy-MM-dd HH:mm]
+ /// 小于10s->刚刚)、x分钟、x小时、[今年: (昨天 HH:mm/1天前)、(2天前)、MM-dd HH:mm],[往年: yyyy-MM-dd HH:mm].
+ Full,
+}
+
+/// Timeline information configuration.
+/// Timeline信息配置.
+abstract class TimelineInfo {
+ String suffixAgo(); //suffix ago(后缀 后).
+
+ String suffixAfter(); //suffix after(后缀 前).
+
+ int maxJustNowSecond() => 30; // max just now second.
+
+ String lessThanOneMinute() => ''; //just now(刚刚).
+
+ String customYesterday() => ''; //Yesterday(昨天).优先级高于keepOneDay
+
+ bool keepOneDay(); //保持1天,example: true -> 1天前, false -> MM-dd.
+
+ bool keepTwoDays(); //保持2天,example: true -> 2天前, false -> MM-dd.
+
+ String oneMinute(int minutes); //a minute(1分钟).
+
+ String minutes(int minutes); //x minutes(x分钟).
+
+ String anHour(int hours); //an hour(1小时).
+
+ String hours(int hours); //x hours(x小时).
+
+ String oneDay(int days); //a day(1天).
+
+ String weeks(int week) => ''; //x week(星期x).
+
+ String days(int days); //x days(x天).
+
+}
+
+class ZhInfo implements TimelineInfo {
+ String suffixAgo() => '前';
+
+ String suffixAfter() => '后';
+
+ int maxJustNowSecond() => 30;
+
+ String lessThanOneMinute() => '刚刚';
+
+ String customYesterday() => '昨天';
+
+ bool keepOneDay() => true;
+
+ bool keepTwoDays() => true;
+
+ String oneMinute(int minutes) => '$minutes分钟';
+
+ String minutes(int minutes) => '$minutes分钟';
+
+ String anHour(int hours) => '$hours小时';
+
+ String hours(int hours) => '$hours小时';
+
+ String oneDay(int days) => '$days天';
+
+ String weeks(int week) => ''; //x week(星期x).
+
+ String days(int days) => '$days天';
+}
+
+class EnInfo implements TimelineInfo {
+ String suffixAgo() => ' ago';
+
+ String suffixAfter() => ' after';
+
+ int maxJustNowSecond() => 30;
+
+ String lessThanOneMinute() => 'just now';
+
+ String customYesterday() => 'Yesterday';
+
+ bool keepOneDay() => true;
+
+ bool keepTwoDays() => true;
+
+ String oneMinute(int minutes) => 'a minute';
+
+ String minutes(int minutes) => '$minutes minutes';
+
+ String anHour(int hours) => 'an hour';
+
+ String hours(int hours) => '$hours hours';
+
+ String oneDay(int days) => 'a day';
+
+ String weeks(int week) => ''; //x week(星期x).
+
+ String days(int days) => '$days days';
+}
+
+class ZhNormalInfo implements TimelineInfo {
+ String suffixAgo() => '前';
+
+ String suffixAfter() => '后';
+
+ int maxJustNowSecond() => 30;
+
+ String lessThanOneMinute() => '刚刚';
+
+ String customYesterday() => '昨天';
+
+ bool keepOneDay() => true;
+
+ bool keepTwoDays() => false;
+
+ String oneMinute(int minutes) => '$minutes分钟';
+
+ String minutes(int minutes) => '$minutes分钟';
+
+ String anHour(int hours) => '$hours小时';
+
+ String hours(int hours) => '$hours小时';
+
+ String oneDay(int days) => '$days天';
+
+ String weeks(int week) => ''; //x week(星期x).
+
+ String days(int days) => '$days天';
+}
+
+class EnNormalInfo implements TimelineInfo {
+ String suffixAgo() => ' ago';
+
+ String suffixAfter() => ' after';
+
+ int maxJustNowSecond() => 30;
+
+ String lessThanOneMinute() => 'just now';
+
+ String customYesterday() => 'Yesterday';
+
+ bool keepOneDay() => true;
+
+ bool keepTwoDays() => false;
+
+ String oneMinute(int minutes) => 'a minute';
+
+ String minutes(int minutes) => '$minutes minutes';
+
+ String anHour(int hours) => 'an hour';
+
+ String hours(int hours) => '$hours hours';
+
+ String oneDay(int days) => 'a day';
+
+ String weeks(int week) => ''; //x week(星期x).
+
+ String days(int days) => '$days days';
+}
+
+Map _timelineInfoMap = {
+ 'zh': ZhInfo(),
+ 'en': EnInfo(),
+ 'zh_normal': ZhNormalInfo(), //keepTwoDays() => false
+ 'en_normal': EnNormalInfo(), //keepTwoDays() => false
+};
+
+/// add custom configuration.
+void setLocaleInfo(String locale, TimelineInfo timelineInfo) {
+ ArgumentError.checkNotNull(locale, '[locale] must not be null');
+ ArgumentError.checkNotNull(timelineInfo, '[timelineInfo] must not be null');
+ _timelineInfoMap[locale] = timelineInfo;
+}
+
+/// TimelineUtil
+class TimelineUtil {
+ /// format time by DateTime.
+ /// dateTime
+ /// locDateTime: current time or schedule time.
+ /// locale: output key.
+ static String formatByDateTime(
+ DateTime dateTime, {
+ DateTime? locDateTime,
+ String? locale,
+ DayFormat? dayFormat,
+ }) {
+ return format(
+ dateTime.millisecondsSinceEpoch,
+ locTimeMs: locDateTime?.millisecondsSinceEpoch,
+ locale: locale,
+ dayFormat: dayFormat,
+ );
+ }
+
+ /// format time by millis.
+ /// dateTime : millis.
+ /// locDateTime: current time or schedule time. millis.
+ /// locale: output key.
+ static String format(
+ int ms, {
+ int? locTimeMs,
+ String? locale,
+ DayFormat? dayFormat,
+ }) {
+ int _locTimeMs = locTimeMs ?? DateTime.now().millisecondsSinceEpoch;
+ String _locale = locale ?? 'en';
+ TimelineInfo _info = _timelineInfoMap[_locale] ?? EnInfo();
+ DayFormat _dayFormat = dayFormat ?? DayFormat.Common;
+
+ int elapsed = _locTimeMs - ms;
+ String suffix;
+ if (elapsed < 0) {
+ suffix = _info.suffixAfter();
+ // suffix after is empty. user just now.
+ if (suffix.isNotEmpty) {
+ elapsed = elapsed.abs();
+ _dayFormat = DayFormat.Simple;
+ } else {
+ return _info.lessThanOneMinute();
+ }
+ } else {
+ suffix = _info.suffixAgo();
+ }
+
+ String timeline;
+ if (_info.customYesterday().isNotEmpty &&
+ DateUtil.isYesterdayByMs(ms, _locTimeMs)) {
+ return _getYesterday(ms, _info, _dayFormat);
+ }
+
+ if (!DateUtil.yearIsEqualByMs(ms, _locTimeMs)) {
+ timeline = _getYear(ms, _dayFormat);
+ if (timeline.isNotEmpty) return timeline;
+ }
+
+ final num seconds = elapsed / 1000;
+ final num minutes = seconds / 60;
+ final num hours = minutes / 60;
+ final num days = hours / 24;
+
+ if (seconds < 90) {
+ timeline = _info.oneMinute(1);
+ if (suffix != _info.suffixAfter() &&
+ _info.lessThanOneMinute().isNotEmpty &&
+ seconds < _info.maxJustNowSecond()) {
+ timeline = _info.lessThanOneMinute();
+ suffix = '';
+ }
+ } else if (minutes < 60) {
+ timeline = _info.minutes(minutes.round());
+ } else if (minutes < 90) {
+ timeline = _info.anHour(1);
+ } else if (hours < 24) {
+ timeline = _info.hours(hours.round());
+ } else {
+ if ((days.round() == 1 && _info.keepOneDay() == true) ||
+ (days.round() == 2 && _info.keepTwoDays() == true)) {
+ _dayFormat = DayFormat.Simple;
+ }
+ timeline = _formatDays(ms, days.round(), _info, _dayFormat);
+ suffix = (_dayFormat == DayFormat.Simple ? suffix : '');
+ }
+ return timeline + suffix;
+ }
+
+ /// Timeline like QQ.
+ ///
+ /// today (HH:mm)
+ /// yesterday (昨天;Yesterday)
+ /// this week (星期一,周一;Monday,Mon)
+ /// others (yyyy-MM-dd)
+ static String formatA(
+ int ms, {
+ int? locMs,
+ String formatToday = 'HH:mm',
+ String format = 'yyyy-MM-dd',
+ String languageCode = 'en',
+ bool short = false,
+ }) {
+ int _locTimeMs = locMs ?? DateTime.now().millisecondsSinceEpoch;
+ int elapsed = _locTimeMs - ms;
+ if (elapsed < 0) {
+ return DateUtil.formatDateMs(ms, format: formatToday);
+ }
+
+ if (DateUtil.isToday(ms, locMs: _locTimeMs)) {
+ return DateUtil.formatDateMs(ms, format: formatToday);
+ }
+
+ if (DateUtil.isYesterdayByMs(ms, _locTimeMs)) {
+ return languageCode == 'zh' ? '昨天' : 'Yesterday';
+ }
+
+ if (DateUtil.isWeek(ms, locMs: _locTimeMs)) {
+ return DateUtil.getWeekdayByMs(ms,
+ languageCode: languageCode, short: short);
+ }
+
+ return DateUtil.formatDateMs(ms, format: format);
+ }
+
+ /// get Yesterday.
+ /// 获取昨天.
+ static String _getYesterday(
+ int ms,
+ TimelineInfo info,
+ DayFormat dayFormat,
+ ) {
+ return info.customYesterday() +
+ (dayFormat == DayFormat.Full
+ ? (' ' + DateUtil.formatDateMs(ms, format: 'HH:mm'))
+ : '');
+ }
+
+ /// get is not year info.
+ /// 获取非今年信息.
+ static String _getYear(
+ int ms,
+ DayFormat dayFormat,
+ ) {
+ if (dayFormat != DayFormat.Simple) {
+ return DateUtil.formatDateMs(ms,
+ format: (dayFormat == DayFormat.Common
+ ? 'yyyy-MM-dd'
+ : 'yyyy-MM-dd HH:mm'));
+ }
+ return '';
+ }
+
+ /// format Days.
+ static String _formatDays(
+ int ms,
+ num days,
+ TimelineInfo info,
+ DayFormat dayFormat,
+ ) {
+ String timeline;
+ switch (dayFormat) {
+ case DayFormat.Simple:
+ timeline = (days == 1
+ ? info.customYesterday().isEmpty
+ ? info.oneDay(days.round())
+ : info.days(2)
+ : info.days(days.round()));
+ break;
+ case DayFormat.Common:
+ timeline = DateUtil.formatDateMs(ms, format: 'MM-dd');
+ break;
+ case DayFormat.Full:
+ timeline = DateUtil.formatDateMs(ms, format: 'MM-dd HH:mm');
+ break;
+ }
+ return timeline;
+ }
+}
diff --git a/FlutterHelper/common_utils/lib/src/timer_util.dart b/FlutterHelper/common_utils/lib/src/timer_util.dart
new file mode 100644
index 00000000..a5b17b24
--- /dev/null
+++ b/FlutterHelper/common_utils/lib/src/timer_util.dart
@@ -0,0 +1,119 @@
+import 'dart:async';
+
+///timer callback.(millisUntilFinished 毫秒).
+typedef void OnTimerTickCallback(int millisUntilFinished);
+
+/**
+ * @Author: Sky24n
+ * @GitHub: https://github.com/Sky24n
+ * @Description: Timer Util.
+ * @Date: 2018/9/28
+ */
+
+/// TimerUtil.
+class TimerUtil {
+ TimerUtil(
+ {this.mInterval = Duration.millisecondsPerSecond, this.mTotalTime = 0});
+
+ /// Timer.
+ Timer? _mTimer;
+
+ /// Is Timer active.
+ /// Timer是否启动.
+ bool _isActive = false;
+
+ /// Timer interval (unit millisecond,def: 1000 millisecond).
+ /// Timer间隔 单位毫秒,默认1000毫秒(1秒).
+ int mInterval;
+
+ /// countdown totalTime.
+ /// 倒计时总时间
+ int mTotalTime; //单位毫秒
+
+ OnTimerTickCallback? _onTimerTickCallback;
+
+ /// set Timer interval. (unit millisecond).
+ /// 设置Timer间隔.
+ void setInterval(int interval) {
+ if (interval <= 0) interval = Duration.millisecondsPerSecond;
+ mInterval = interval;
+ }
+
+ /// set countdown totalTime. (unit millisecond).
+ /// 设置倒计时总时间.
+ void setTotalTime(int totalTime) {
+ if (totalTime <= 0) return;
+ mTotalTime = totalTime;
+ }
+
+ /// start Timer.
+ /// 启动定时Timer.
+ void startTimer() {
+ if (_isActive || mInterval <= 0) return;
+ _isActive = true;
+ Duration duration = Duration(milliseconds: mInterval);
+ _doCallback(0);
+ _mTimer = Timer.periodic(duration, (Timer timer) {
+ _doCallback(timer.tick);
+ });
+ }
+
+ /// start countdown Timer.
+ /// 启动倒计时Timer.
+ void startCountDown() {
+ if (_isActive || mInterval <= 0 || mTotalTime <= 0) return;
+ _isActive = true;
+ Duration duration = Duration(milliseconds: mInterval);
+ _doCallback(mTotalTime);
+ _mTimer = Timer.periodic(duration, (Timer timer) {
+ int time = mTotalTime - mInterval;
+ mTotalTime = time;
+ if (time >= mInterval) {
+ _doCallback(time);
+ } else if (time == 0) {
+ _doCallback(time);
+ cancel();
+ } else {
+ timer.cancel();
+ Future.delayed(Duration(milliseconds: time), () {
+ mTotalTime = 0;
+ _doCallback(0);
+ cancel();
+ });
+ }
+ });
+ }
+
+ void _doCallback(int time) {
+ if (_onTimerTickCallback != null) {
+ _onTimerTickCallback!(time);
+ }
+ }
+
+ /// update countdown totalTime.
+ /// 重设倒计时总时间.
+ void updateTotalTime(int totalTime) {
+ cancel();
+ mTotalTime = totalTime;
+ startCountDown();
+ }
+
+ /// timer is Active.
+ /// Timer是否启动.
+ bool isActive() {
+ return _isActive;
+ }
+
+ /// Cancels the timer.
+ /// 取消计时器.
+ void cancel() {
+ _mTimer?.cancel();
+ _mTimer = null;
+ _isActive = false;
+ }
+
+ /// set timer callback.
+ void setOnTimerTickCallback(OnTimerTickCallback callback) {
+ _onTimerTickCallback = callback;
+ }
+}
diff --git a/FlutterHelper/common_utils/pkgget b/FlutterHelper/common_utils/pkgget
new file mode 100644
index 00000000..15cf7712
--- /dev/null
+++ b/FlutterHelper/common_utils/pkgget
@@ -0,0 +1,3 @@
+export PUB_HOSTED_URL=https://pub.flutter-io.cn
+export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
+flutter packages get
\ No newline at end of file
diff --git a/FlutterHelper/common_utils/pubspec.yaml b/FlutterHelper/common_utils/pubspec.yaml
new file mode 100644
index 00000000..290869aa
--- /dev/null
+++ b/FlutterHelper/common_utils/pubspec.yaml
@@ -0,0 +1,15 @@
+name: common_utils
+description: Dart common utils library.Contain DateUtil, EncryptUtil, JsonUtil, LogUtil, MoneyUtil, NumUtil, ObjectUtil, RegexUtil, TextUtil, TimelineUtil, TimerUtil.
+version: 2.0.2
+homepage: https://github.com/Sky24n/common_utils
+
+environment:
+ sdk: ">=2.12.0-259.9.beta <3.0.0"
+
+dependencies:
+ # https://github.com/a14n/dart-decimal
+ decimal: ">=1.0.0 <3.0.0"
+ # https://github.com/dart-lang/crypto
+ crypto: ">=3.0.0 <5.0.0"
+ # https://github.com/dart-lang/convert
+ convert: ">=3.0.0 <5.0.0"
\ No newline at end of file
diff --git a/FlutterHelper/common_utils/uploadMaster b/FlutterHelper/common_utils/uploadMaster
new file mode 100644
index 00000000..6f74d207
--- /dev/null
+++ b/FlutterHelper/common_utils/uploadMaster
@@ -0,0 +1 @@
+git push origin master
diff --git a/FlutterHelper/ninghao_flutter-master/.gitignore b/FlutterHelper/ninghao_flutter-master/.gitignore
new file mode 100644
index 00000000..dee655cc
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.gitignore
@@ -0,0 +1,9 @@
+.DS_Store
+.dart_tool/
+
+.packages
+.pub/
+
+build/
+
+.flutter-plugins
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/codeStyles/Project.xml b/FlutterHelper/ninghao_flutter-master/.idea/codeStyles/Project.xml
new file mode 100644
index 00000000..30aa626c
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/inspectionProfiles/Project_Default.xml b/FlutterHelper/ninghao_flutter-master/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..35c3ada1
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/libraries/Dart_Packages.xml b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Dart_Packages.xml
new file mode 100644
index 00000000..40ed6700
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Dart_Packages.xml
@@ -0,0 +1,300 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/libraries/Dart_SDK.xml b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Dart_SDK.xml
new file mode 100644
index 00000000..3d881b94
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Dart_SDK.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/libraries/Flutter_Plugins.xml b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Flutter_Plugins.xml
new file mode 100644
index 00000000..b0f69711
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Flutter_Plugins.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/libraries/Flutter_for_Android.xml b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Flutter_for_Android.xml
new file mode 100644
index 00000000..54548d9d
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/libraries/Flutter_for_Android.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/misc.xml b/FlutterHelper/ninghao_flutter-master/.idea/misc.xml
new file mode 100644
index 00000000..f6d2d510
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/misc.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/modules.xml b/FlutterHelper/ninghao_flutter-master/.idea/modules.xml
new file mode 100644
index 00000000..192b704d
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/runConfigurations.xml b/FlutterHelper/ninghao_flutter-master/.idea/runConfigurations.xml
new file mode 100644
index 00000000..797acea5
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/runConfigurations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/runConfigurations/main_dart.xml b/FlutterHelper/ninghao_flutter-master/.idea/runConfigurations/main_dart.xml
new file mode 100644
index 00000000..aab7b5cd
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/runConfigurations/main_dart.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/vcs.xml b/FlutterHelper/ninghao_flutter-master/.idea/vcs.xml
new file mode 100644
index 00000000..b2bdec2d
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.idea/workspace.xml b/FlutterHelper/ninghao_flutter-master/.idea/workspace.xml
new file mode 100644
index 00000000..60be9c8d
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.idea/workspace.xml
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1533729618709
+
+
+ 1533729618709
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/.metadata b/FlutterHelper/ninghao_flutter-master/.metadata
new file mode 100644
index 00000000..c4204e56
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.metadata
@@ -0,0 +1,8 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: 66091f969653fd3535b265ddcd87436901858a1d
+ channel: dev
diff --git a/FlutterHelper/ninghao_flutter-master/.vscode/launch.json b/FlutterHelper/ninghao_flutter-master/.vscode/launch.json
new file mode 100644
index 00000000..18135079
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/.vscode/launch.json
@@ -0,0 +1,13 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Flutter",
+ "request": "launch",
+ "type": "dart"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/README.md b/FlutterHelper/ninghao_flutter-master/README.md
new file mode 100644
index 00000000..3390f74c
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/README.md
@@ -0,0 +1,9 @@
+IT教程吧 - www.itjc8.com
+# ninghao_flutter
+
+A new Flutter project.
+
+## Getting Started
+
+For help getting started with Flutter, view our online
+[documentation](https://flutter.io/).
diff --git a/FlutterHelper/ninghao_flutter-master/android/.gitignore b/FlutterHelper/ninghao_flutter-master/android/.gitignore
new file mode 100644
index 00000000..65b7315a
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/.gitignore
@@ -0,0 +1,10 @@
+*.iml
+*.class
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+GeneratedPluginRegistrant.java
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/build.gradle b/FlutterHelper/ninghao_flutter-master/android/app/build.gradle
new file mode 100644
index 00000000..3924119a
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/app/build.gradle
@@ -0,0 +1,61 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ throw new GradleException("versionCode not found. Define flutter.versionCode in the local.properties file.")
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ throw new GradleException("versionName not found. Define flutter.versionName in the local.properties file.")
+}
+
+apply plugin: 'com.android.application'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion 27
+
+ lintOptions {
+ disable 'InvalidPackage'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.ninghaoflutter"
+ minSdkVersion 16
+ targetSdkVersion 27
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+}
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/AndroidManifest.xml b/FlutterHelper/ninghao_flutter-master/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..5f9d92cf
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/java/com/example/ninghaoflutter/MainActivity.java b/FlutterHelper/ninghao_flutter-master/android/app/src/main/java/com/example/ninghaoflutter/MainActivity.java
new file mode 100644
index 00000000..7bc1876a
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/app/src/main/java/com/example/ninghaoflutter/MainActivity.java
@@ -0,0 +1,13 @@
+package com.example.ninghaoflutter;
+
+import android.os.Bundle;
+import io.flutter.app.FlutterActivity;
+import io.flutter.plugins.GeneratedPluginRegistrant;
+
+public class MainActivity extends FlutterActivity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ GeneratedPluginRegistrant.registerWith(this);
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/drawable/launch_background.xml b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 00000000..304732f8
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..db77bb4b
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..17987b79
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..09d43914
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..d5f1c8d3
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..4d6372ee
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/values/styles.xml b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..00fa4417
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/android/build.gradle b/FlutterHelper/ninghao_flutter-master/android/build.gradle
new file mode 100644
index 00000000..d4225c79
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/build.gradle
@@ -0,0 +1,29 @@
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.1.2'
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/FlutterHelper/ninghao_flutter-master/android/gradle.properties b/FlutterHelper/ninghao_flutter-master/android/gradle.properties
new file mode 100644
index 00000000..8bd86f68
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/gradle.properties
@@ -0,0 +1 @@
+org.gradle.jvmargs=-Xmx1536M
diff --git a/FlutterHelper/ninghao_flutter-master/android/gradle/wrapper/gradle-wrapper.jar b/FlutterHelper/ninghao_flutter-master/android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..13372aef
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/FlutterHelper/ninghao_flutter-master/android/gradle/wrapper/gradle-wrapper.properties b/FlutterHelper/ninghao_flutter-master/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..9372d0f3
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
diff --git a/FlutterHelper/ninghao_flutter-master/android/gradlew b/FlutterHelper/ninghao_flutter-master/android/gradlew
new file mode 100644
index 00000000..9d82f789
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/FlutterHelper/ninghao_flutter-master/android/gradlew.bat b/FlutterHelper/ninghao_flutter-master/android/gradlew.bat
new file mode 100644
index 00000000..8a0b282a
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/FlutterHelper/ninghao_flutter-master/android/settings.gradle b/FlutterHelper/ninghao_flutter-master/android/settings.gradle
new file mode 100644
index 00000000..5a2f14fb
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/android/settings.gradle
@@ -0,0 +1,15 @@
+include ':app'
+
+def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
+
+def plugins = new Properties()
+def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
+if (pluginsFile.exists()) {
+ pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
+}
+
+plugins.each { name, path ->
+ def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
+ include ":$name"
+ project(":$name").projectDir = pluginDirectory
+}
diff --git a/FlutterHelper/ninghao_flutter-master/ios/.gitignore b/FlutterHelper/ninghao_flutter-master/ios/.gitignore
new file mode 100644
index 00000000..79cc4da8
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/.gitignore
@@ -0,0 +1,45 @@
+.idea/
+.vagrant/
+.sconsign.dblite
+.svn/
+
+.DS_Store
+*.swp
+profile
+
+DerivedData/
+build/
+GeneratedPluginRegistrant.h
+GeneratedPluginRegistrant.m
+
+.generated/
+
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.perspectivev3
+
+xcuserdata
+
+*.moved-aside
+
+*.pyc
+*sync/
+Icon?
+.tags*
+
+/Flutter/app.flx
+/Flutter/app.zip
+/Flutter/flutter_assets/
+/Flutter/App.framework
+/Flutter/Flutter.framework
+/Flutter/Generated.xcconfig
+/ServiceDefinitions.json
+
+Pods/
+.symlinks/
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Flutter/AppFrameworkInfo.plist b/FlutterHelper/ninghao_flutter-master/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 00000000..9367d483
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 8.0
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Flutter/Debug.xcconfig b/FlutterHelper/ninghao_flutter-master/ios/Flutter/Debug.xcconfig
new file mode 100644
index 00000000..592ceee8
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Flutter/Release.xcconfig b/FlutterHelper/ninghao_flutter-master/ios/Flutter/Release.xcconfig
new file mode 100644
index 00000000..592ceee8
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Flutter/flutter_export_environment.sh b/FlutterHelper/ninghao_flutter-master/ios/Flutter/flutter_export_environment.sh
new file mode 100755
index 00000000..f59f0674
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Flutter/flutter_export_environment.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=/Users/flannery/Library/Android/flutter"
+export "FLUTTER_APPLICATION_PATH=/Users/flannery/Desktop/AndroidHelper/FlutterHelper/ninghao_flutter-master"
+export "COCOAPODS_PARALLEL_CODE_SIGN=true"
+export "FLUTTER_TARGET=lib/main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "SYMROOT=${SOURCE_ROOT}/../build/ios"
+export "FLUTTER_BUILD_NAME=1.0.0"
+export "FLUTTER_BUILD_NUMBER=1"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.pbxproj b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..5b245582
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,438 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
+ 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
+ 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
+ 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
+ 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
+ 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
+ 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
+ 3B80C3931E831B6300D905FE /* App.framework */,
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEBA1CF902C7004384FC /* Flutter.framework */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 97C146F11CF9000F007C117D /* Supporting Files */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ 97C146F11CF9000F007C117D /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146F21CF9000F007C117D /* main.m */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0910;
+ ORGANIZATIONNAME = "The Chromium Authors";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
+ 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.ninghaoFlutter;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.ninghaoFlutter;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..1d526a16
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 00000000..1263ac84
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner.xcworkspace/contents.xcworkspacedata b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..1d526a16
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000..949b6789
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ BuildSystemType
+ Original
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/AppDelegate.h b/FlutterHelper/ninghao_flutter-master/ios/Runner/AppDelegate.h
new file mode 100644
index 00000000..36e21bbf
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/AppDelegate.h
@@ -0,0 +1,6 @@
+#import
+#import
+
+@interface AppDelegate : FlutterAppDelegate
+
+@end
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/AppDelegate.m b/FlutterHelper/ninghao_flutter-master/ios/Runner/AppDelegate.m
new file mode 100644
index 00000000..59a72e90
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/AppDelegate.m
@@ -0,0 +1,13 @@
+#include "AppDelegate.h"
+#include "GeneratedPluginRegistrant.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application
+ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [GeneratedPluginRegistrant registerWithRegistry:self];
+ // Override point for customization after application launch.
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
+}
+
+@end
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 00000000..d36b1fab
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 00000000..3d43d11e
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 00000000..28c6bf03
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 00000000..2ccbfd96
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 00000000..f091b6b0
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 00000000..4cde1211
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 00000000..d0ef06e7
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 00000000..dcdc2306
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 00000000..2ccbfd96
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 00000000..c8f9ed8f
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 00000000..a6d6b860
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 00000000..a6d6b860
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 00000000..75b2d164
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 00000000..c4df70d3
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 00000000..6a84f41e
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 00000000..d0e1f585
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 00000000..0bedcf2f
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 00000000..89c2725b
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Base.lproj/LaunchScreen.storyboard b/FlutterHelper/ninghao_flutter-master/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 00000000..f2e259c7
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Base.lproj/Main.storyboard b/FlutterHelper/ninghao_flutter-master/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 00000000..f3c28516
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/Info.plist b/FlutterHelper/ninghao_flutter-master/ios/Runner/Info.plist
new file mode 100644
index 00000000..e27043f5
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/Info.plist
@@ -0,0 +1,50 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ ninghao_flutter
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ CFBundleLocalizations
+
+ en
+ zh_CN
+
+
+
diff --git a/FlutterHelper/ninghao_flutter-master/ios/Runner/main.m b/FlutterHelper/ninghao_flutter-master/ios/Runner/main.m
new file mode 100644
index 00000000..dff6597e
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/ios/Runner/main.m
@@ -0,0 +1,9 @@
+#import
+#import
+#import "AppDelegate.h"
+
+int main(int argc, char* argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/alert_dialog_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/alert_dialog_demo.dart
new file mode 100644
index 00000000..9b89040c
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/alert_dialog_demo.dart
@@ -0,0 +1,86 @@
+import 'package:flutter/material.dart';
+import 'dart:async';
+
+enum Action {
+ Ok,
+ Cancel
+}
+
+class AlertDialogDemo extends StatefulWidget {
+ @override
+ _AlertDialogDemoState createState() => _AlertDialogDemoState();
+}
+
+class _AlertDialogDemoState extends State {
+ String _choice = 'Nothing';
+
+ Future _openAlertDialog() async {
+ final action = await showDialog(
+ context: context,
+ barrierDismissible: false,
+ builder: (BuildContext context) {
+ return AlertDialog(
+ title: Text('AlertDialog'),
+ content: Text('Are you sure about this?'),
+ actions: [
+ FlatButton(
+ child: Text('Cancel'),
+ onPressed: () {
+ Navigator.pop(context, Action.Cancel);
+ },
+ ),
+ FlatButton(
+ child: Text('Ok'),
+ onPressed: () {
+ Navigator.pop(context, Action.Ok);
+ },
+ ),
+ ],
+ );
+ },
+ );
+
+ switch (action) {
+ case Action.Ok:
+ setState(() {
+ _choice = 'Ok';
+ });
+ break;
+ case Action.Cancel:
+ setState(() {
+ _choice = 'Cancel';
+ });
+ break;
+ default:
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('AlertDialogDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text('Your choice is: $_choice'),
+ SizedBox(height: 16.0,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ RaisedButton(
+ child: Text('Open AlertDialog'),
+ onPressed: _openAlertDialog,
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/animation/animation_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/animation/animation_demo.dart
new file mode 100644
index 00000000..41020f88
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/animation/animation_demo.dart
@@ -0,0 +1,105 @@
+import 'package:flutter/material.dart';
+
+class AnimationDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('AnimationDemo'),
+ elevation: 0.0,
+ ),
+ body: AnimationDemoHome());
+ }
+}
+
+class AnimationDemoHome extends StatefulWidget {
+ @override
+ _AnimationDemoHomeState createState() => _AnimationDemoHomeState();
+}
+
+class _AnimationDemoHomeState extends State
+ with TickerProviderStateMixin {
+ AnimationController animationDemoController;
+ Animation animation;
+ Animation animationColor;
+ CurvedAnimation curve;
+
+ @override
+ void initState() {
+ super.initState();
+
+ animationDemoController = AnimationController(
+ // value: 32.0,
+ // lowerBound: 32.0,
+ // upperBound: 100.0,
+ duration: Duration(milliseconds: 1000),
+ vsync: this,
+ );
+
+ curve = CurvedAnimation(
+ parent: animationDemoController, curve: Curves.bounceOut);
+
+ animation = Tween(begin: 32.0, end: 100.0).animate(curve);
+ animationColor =
+ ColorTween(begin: Colors.red, end: Colors.red[900]).animate(curve);
+
+ // animationDemoController.addListener(() {
+ // // print('${animationDemoController.value}');
+ // setState(() {});
+ // });
+
+ animationDemoController.addStatusListener((AnimationStatus status) {
+ print(status);
+ });
+
+ // animationDemoController.forward();
+ }
+
+ @override
+ void dispose() {
+ super.dispose();
+
+ animationDemoController.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Center(
+ child: AnimatedHeart(
+ animations: [
+ animation,
+ animationColor,
+ ],
+ controller: animationDemoController,
+ ),
+ );
+ }
+}
+
+class AnimatedHeart extends AnimatedWidget {
+ final List animations;
+ final AnimationController controller;
+
+ AnimatedHeart({
+ this.animations,
+ this.controller,
+ }) : super(listenable: controller);
+
+ @override
+ Widget build(BuildContext context) {
+ return IconButton(
+ icon: Icon(Icons.favorite),
+ iconSize: animations[0].value,
+ color: animations[1].value,
+ onPressed: () {
+ switch (controller.status) {
+ case AnimationStatus.completed:
+ controller.reverse();
+ break;
+ default:
+ controller.forward();
+ }
+ },
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/basic_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/basic_demo.dart
new file mode 100644
index 00000000..3703ace6
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/basic_demo.dart
@@ -0,0 +1,121 @@
+import 'package:flutter/material.dart';
+
+class BasicDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return ContainerBoxDecorationDemo();
+ }
+}
+
+class ContainerBoxDecorationDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ // color: Colors.grey[100],
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ image: NetworkImage('https://resources.ninghao.org/images/say-hello-to-barry.jpg'),
+ alignment: Alignment.topCenter,
+ // repeat: ImageRepeat.repeatY,
+ fit: BoxFit.cover,
+ colorFilter: ColorFilter.mode(
+ Colors.indigoAccent[400].withOpacity(0.5),
+ BlendMode.hardLight,
+ ),
+ ),
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ child: Icon(Icons.pool, size: 32.0, color: Colors.white),
+ // color: Color.fromRGBO(3, 54, 255, 1.0),
+ padding: EdgeInsets.all(16.0),
+ margin: EdgeInsets.all(8.0),
+ width: 90.0,
+ height: 90.0,
+ decoration: BoxDecoration(
+ color: Color.fromRGBO(3, 54, 255, 1.0),
+ border: Border.all(
+ color: Colors.indigoAccent[100],
+ width: 3.0,
+ style: BorderStyle.solid,
+ ),
+ // borderRadius: BorderRadius.circular(16.0),
+ boxShadow: [
+ BoxShadow(
+ offset: Offset(0.0, 16.0),
+ color: Color.fromRGBO(16, 20, 188, 1.0),
+ blurRadius: 25.0,
+ spreadRadius: -9.0,
+ ),
+ ],
+ shape: BoxShape.circle,
+ // gradient: RadialGradient(
+ // colors: [
+ // Color.fromRGBO(7, 102, 255, 1.0),
+ // Color.fromRGBO(3, 28, 128, 1.0),
+ // ],
+ // ),
+ gradient: LinearGradient(
+ colors: [
+ Color.fromRGBO(7, 102, 255, 1.0),
+ Color.fromRGBO(3, 28, 128, 1.0),
+ ],
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class RichTextDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return RichText(
+ text: TextSpan(
+ text: 'ninghao',
+ style: TextStyle(
+ color: Colors.deepPurpleAccent,
+ fontSize: 34.0,
+ fontStyle: FontStyle.italic,
+ fontWeight: FontWeight.w100,
+ ),
+ children: [
+ TextSpan(
+ text: '.net',
+ style: TextStyle(
+ fontSize: 17.0,
+ color: Colors.grey,
+ ),
+ )
+ ],
+ ),
+ );
+ }
+}
+
+class TextDemo extends StatelessWidget {
+ final TextStyle _textStyle = TextStyle(
+ fontSize: 16.0,
+ );
+
+ final String _author = '李白';
+ final String _title = '将进酒';
+
+ @override
+ Widget build(BuildContext context) {
+ // TODO: implement build
+ return Text(
+ '《 $_title 》—— $_author。君不见黄河之水天上来,奔流到海不复回。君不见高堂明镜悲白发,朝如青丝暮成雪。人生得意须尽欢,莫使金樽空对月。天生我材必有用,千金散尽还复来。烹羊宰牛且为乐,会须一饮三百杯。',
+ textAlign: TextAlign.left,
+ style: _textStyle,
+ maxLines: 3,
+ overflow: TextOverflow.ellipsis,
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/bloc/bloc_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/bloc/bloc_demo.dart
new file mode 100644
index 00000000..d1d68a00
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/bloc/bloc_demo.dart
@@ -0,0 +1,19 @@
+import 'package:flutter/material.dart';
+import 'package:ninghao_flutter/demo/bloc/counter_bloc_demo.dart';
+
+class BlocDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return CounterProvider(
+ bloc: CounterBloc(),
+ child: Scaffold(
+ appBar: AppBar(
+ title: Text('BlocDemo'),
+ elevation: 0.0,
+ ),
+ body: CounterHome(),
+ floatingActionButton: CounterActionButton(),
+ ),
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/bloc/counter_bloc_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/bloc/counter_bloc_demo.dart
new file mode 100644
index 00000000..4593282d
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/bloc/counter_bloc_demo.dart
@@ -0,0 +1,88 @@
+import 'dart:async';
+
+import 'package:flutter/material.dart';
+
+class CounterHome extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ CounterBloc _counterBloc = CounterProvider.of(context).bloc;
+
+ return Center(
+ child: StreamBuilder(
+ initialData: 0,
+ stream: _counterBloc.count,
+ builder: (context, snapshot) {
+ return ActionChip(
+ label: Text('${snapshot.data}'),
+ onPressed: () {
+ // _counterBloc.log();
+ _counterBloc.counter.add(1);
+ },
+ );
+ },
+ ),
+ );
+ }
+}
+
+class CounterActionButton extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ CounterBloc _counterBloc = CounterProvider.of(context).bloc;
+
+ return FloatingActionButton(
+ child: Icon(Icons.add),
+ onPressed: () {
+ // _counterBloc.log();
+ _counterBloc.counter.add(1);
+ },
+ );
+ }
+}
+
+class CounterProvider extends InheritedWidget {
+ final Widget child;
+ final CounterBloc bloc;
+
+ CounterProvider({
+ this.child,
+ this.bloc,
+ }) : super(child: child);
+
+ static CounterProvider of(BuildContext context) =>
+ context.inheritFromWidgetOfExactType(CounterProvider);
+
+ @override
+ bool updateShouldNotify(CounterProvider oldWidget) {
+ return true;
+ }
+}
+
+class CounterBloc {
+ int _count = 0;
+
+ final _counterActionController = StreamController();
+ StreamSink get counter => _counterActionController.sink;
+
+ final _counterController = StreamController();
+ Stream get count => _counterController.stream;
+
+ CounterBloc() {
+ _counterActionController.stream.listen(onData);
+ }
+
+ void onData(int data) {
+ print('$data');
+ _count = data + _count;
+ _counterController.add(_count);
+ }
+
+ void disponse() {
+ _counterActionController.close();
+ _counterController.close();
+ }
+
+ void log() {
+ print('BLoC');
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/bottom_navigation_bar_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/bottom_navigation_bar_demo.dart
new file mode 100644
index 00000000..930e60b7
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/bottom_navigation_bar_demo.dart
@@ -0,0 +1,48 @@
+import 'package:flutter/material.dart';
+
+class BottomNavigationBarDemo extends StatefulWidget {
+ @override
+ State createState() {
+ // TODO: implement createState
+ return _BottomNavigationBarDemoState();
+ }
+}
+
+class _BottomNavigationBarDemoState extends State {
+ int _currentIndex = 0;
+
+ void _onTapHandler (int index) {
+ setState(() {
+ _currentIndex = index;
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ // TODO: implement build
+ return BottomNavigationBar(
+ currentIndex: _currentIndex,
+ onTap: _onTapHandler,
+ type: BottomNavigationBarType.fixed,
+ fixedColor: Colors.black,
+ items: [
+ BottomNavigationBarItem(
+ icon: Icon(Icons.explore),
+ title: Text('Explore'),
+ ),
+ BottomNavigationBarItem(
+ icon: Icon(Icons.history),
+ title: Text('History'),
+ ),
+ BottomNavigationBarItem(
+ icon: Icon(Icons.list),
+ title: Text('List'),
+ ),
+ BottomNavigationBarItem(
+ icon: Icon(Icons.person),
+ title: Text('My'),
+ ),
+ ],
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/bottom_sheet_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/bottom_sheet_demo.dart
new file mode 100644
index 00000000..77b1ff07
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/bottom_sheet_demo.dart
@@ -0,0 +1,102 @@
+import 'package:flutter/material.dart';
+import 'dart:async';
+
+class BottomSheetDemo extends StatefulWidget {
+ @override
+ _BottomSheetDemoState createState() => _BottomSheetDemoState();
+}
+
+class _BottomSheetDemoState extends State {
+ final _bottomSheetScaffoldKey = GlobalKey();
+
+ _openBottomSheet() {
+ _bottomSheetScaffoldKey
+ .currentState
+ .showBottomSheet((BuildContext context) {
+ return BottomAppBar(
+ child: Container(
+ height: 90.0,
+ width: double.infinity,
+ padding: EdgeInsets.all(16.0),
+ child: Row(
+ children: [
+ Icon(Icons.pause_circle_outline),
+ SizedBox(width: 16.0,),
+ Text('01:30 / 03:30'),
+ Expanded(
+ child: Text('Fix you - Coldplay', textAlign: TextAlign.right,),
+ ),
+ ],
+ ),
+ ),
+ );
+ });
+ }
+
+ Future _openModalBottomSheet() async {
+ final option = await showModalBottomSheet(
+ context: context,
+ builder: (BuildContext context) {
+ return Container(
+ height: 200.0,
+ child: Column(
+ children: [
+ ListTile(
+ title: Text('Option A'),
+ onTap: () {
+ Navigator.pop(context, 'A');
+ },
+ ),
+ ListTile(
+ title: Text('Option B'),
+ onTap: () {
+ Navigator.pop(context, 'B');
+ },
+ ),
+ ListTile(
+ title: Text('Option C'),
+ onTap: () {
+ Navigator.pop(context, 'C');
+ },
+ ),
+ ],
+ ),
+ );
+ }
+ );
+
+ print(option);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ key: _bottomSheetScaffoldKey,
+ appBar: AppBar(
+ title: Text('BottomSheetDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ FlatButton(
+ child: Text('Open BottomSheet'),
+ onPressed: _openBottomSheet,
+ ),
+ FlatButton(
+ child: Text('Modal BottomSheet'),
+ onPressed: _openModalBottomSheet,
+ ),
+ ]
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/button_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/button_demo.dart
new file mode 100644
index 00000000..19e89638
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/button_demo.dart
@@ -0,0 +1,208 @@
+import 'package:flutter/material.dart';
+
+class ButtonDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ final Widget flatButtonDemo = Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ FlatButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey,
+ textColor: Theme.of(context).accentColor,
+ ),
+ FlatButton.icon(
+ icon: Icon(Icons.add),
+ label: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey,
+ textColor: Theme.of(context).accentColor,
+ ),
+ ],
+ );
+
+ final Widget raisedButtonDemo = Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Theme(
+ data: Theme.of(context).copyWith(
+ buttonColor: Theme.of(context).accentColor,
+ buttonTheme: ButtonThemeData(
+ textTheme: ButtonTextTheme.primary,
+ // shape: BeveledRectangleBorder(
+ // borderRadius: BorderRadius.circular(5.0),
+ // ),
+ shape: StadiumBorder(),
+ ),
+ ),
+ child: RaisedButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey,
+ elevation: 0.0,
+ // color: Theme.of(context).accentColor,
+ // textColor: Colors.white,
+ // textTheme: ButtonTextTheme.primary,
+ ),
+ ),
+ SizedBox(width: 16.0,),
+ RaisedButton.icon(
+ icon: Icon(Icons.add),
+ label: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey,
+ elevation: 12.0,
+ textColor: Theme.of(context).accentColor,
+ ),
+ ],
+ );
+
+ final Widget outlineButtonDemo = Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Theme(
+ data: Theme.of(context).copyWith(
+ buttonColor: Theme.of(context).accentColor,
+ buttonTheme: ButtonThemeData(
+ textTheme: ButtonTextTheme.primary,
+ // shape: BeveledRectangleBorder(
+ // borderRadius: BorderRadius.circular(5.0),
+ // ),
+ shape: StadiumBorder(),
+ ),
+ ),
+ child: OutlineButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey[100],
+ borderSide: BorderSide(
+ color: Colors.black,
+ ),
+ // color: Theme.of(context).accentColor,
+ textColor: Colors.black,
+ highlightedBorderColor: Colors.grey,
+ // textTheme: ButtonTextTheme.primary,
+ ),
+ ),
+ SizedBox(width: 16.0,),
+ OutlineButton.icon(
+ icon: Icon(Icons.add),
+ label: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey,
+ textColor: Theme.of(context).accentColor,
+ ),
+ ],
+ );
+
+ final Widget fixedWidthButton = Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ width: 130.0,
+ child: OutlineButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey[100],
+ borderSide: BorderSide(
+ color: Colors.black,
+ ),
+ textColor: Colors.black,
+ highlightedBorderColor: Colors.grey,
+ ),
+ ),
+ ],
+ );
+
+ final Widget expandedButton = Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: OutlineButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey[100],
+ borderSide: BorderSide(
+ color: Colors.black,
+ ),
+ textColor: Colors.black,
+ highlightedBorderColor: Colors.grey,
+ ),
+ ),
+ SizedBox(width: 16.0,),
+ Expanded(
+ flex: 2,
+ child: OutlineButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey[100],
+ borderSide: BorderSide(
+ color: Colors.black,
+ ),
+ textColor: Colors.black,
+ highlightedBorderColor: Colors.grey,
+ ),
+ ),
+ ],
+ );
+
+ final Widget buttonBarDemo = Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Theme(
+ data: Theme.of(context).copyWith(
+ buttonTheme: ButtonThemeData(
+ padding: EdgeInsets.symmetric(horizontal: 32.0),
+ ),
+ ),
+ child: ButtonBar(
+ children: [
+ OutlineButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey[100],
+ borderSide: BorderSide(
+ color: Colors.black,
+ ),
+ textColor: Colors.black,
+ highlightedBorderColor: Colors.grey,
+ ),
+ OutlineButton(
+ child: Text('Button'),
+ onPressed: () {},
+ splashColor: Colors.grey[100],
+ borderSide: BorderSide(
+ color: Colors.black,
+ ),
+ textColor: Colors.black,
+ highlightedBorderColor: Colors.grey,
+ ),
+ ],
+ ),
+ ),
+ ],
+ );
+
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('ButtonDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ flatButtonDemo,
+ raisedButtonDemo,
+ outlineButtonDemo,
+ fixedWidthButton,
+ expandedButton,
+ buttonBarDemo,
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/card_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/card_demo.dart
new file mode 100644
index 00000000..85da6258
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/card_demo.dart
@@ -0,0 +1,70 @@
+import 'package:flutter/material.dart';
+import '../model/post.dart';
+
+class CardDemo extends StatefulWidget {
+ @override
+ _CardDemoState createState() => _CardDemoState();
+}
+
+class _CardDemoState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('CardDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: ListView(
+ children: posts.map((post) {
+ return Card(
+ child: Column(
+ children: [
+ AspectRatio(
+ aspectRatio: 16/9,
+ child: ClipRRect(
+ borderRadius: BorderRadius.only(
+ topLeft: Radius.circular(4.0),
+ topRight: Radius.circular(4.0),
+ ),
+ child: Image.network(
+ post.imageUrl,
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ ListTile(
+ leading: CircleAvatar(
+ backgroundImage: NetworkImage(post.imageUrl),
+ ),
+ title: Text(post.title),
+ subtitle: Text(post.author),
+ ),
+ Container(
+ padding: EdgeInsets.all(16.0),
+ child: Text(post.description, maxLines: 2, overflow: TextOverflow.ellipsis,),
+ ),
+ ButtonTheme.bar(
+ child: ButtonBar(
+ children: [
+ FlatButton(
+ child: Text('Like'.toUpperCase()),
+ onPressed: () {},
+ ),
+ FlatButton(
+ child: Text('Read'.toUpperCase()),
+ onPressed: () {},
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }).toList(),
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/checkbox_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/checkbox_demo.dart
new file mode 100644
index 00000000..0652b390
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/checkbox_demo.dart
@@ -0,0 +1,54 @@
+import 'package:flutter/material.dart';
+
+class CheckboxDemo extends StatefulWidget {
+ @override
+ _CheckboxDemoState createState() => _CheckboxDemoState();
+}
+
+class _CheckboxDemoState extends State {
+ bool _checkboxItemA = true;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('CheckboxDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ CheckboxListTile(
+ value: _checkboxItemA,
+ onChanged: (value) {
+ setState(() {
+ _checkboxItemA = value;
+ });
+ },
+ title: Text('Checkbox Item A'),
+ subtitle: Text('Description'),
+ secondary: Icon(Icons.bookmark),
+ selected: _checkboxItemA,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ // Checkbox(
+ // value: _checkboxItemA,
+ // onChanged: (value) {
+ // setState(() {
+ // _checkboxItemA = value;
+ // });
+ // },
+ // activeColor: Colors.black,
+ // ),
+ ],
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/chip_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/chip_demo.dart
new file mode 100644
index 00000000..6a3a40e8
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/chip_demo.dart
@@ -0,0 +1,178 @@
+import 'package:flutter/material.dart';
+
+class ChipDemo extends StatefulWidget {
+ @override
+ _ChipDemoState createState() => _ChipDemoState();
+}
+
+class _ChipDemoState extends State {
+ List _tags = [
+ 'Apple',
+ 'Banana',
+ 'Lemon',
+ ];
+
+ String _action = 'Nothing';
+ List _selected = [];
+ String _choice = 'Lemon';
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('ChipDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Wrap(
+ spacing: 8.0,
+ runSpacing: 8.0,
+ children: [
+ Chip(
+ label: Text('Life'),
+ ),
+ Chip(
+ label: Text('Sunset'),
+ backgroundColor: Colors.orange,
+ ),
+ Chip(
+ label: Text('Wanghao'),
+ avatar: CircleAvatar(
+ backgroundColor: Colors.grey,
+ child: Text('皓'),
+ ),
+ ),
+ Chip(
+ label: Text('Wanghao'),
+ avatar: CircleAvatar(
+ backgroundImage: NetworkImage(
+ 'https://resources.ninghao.net/images/wanghao.jpg'
+ ),
+ ),
+ ),
+ Chip(
+ label: Text('City'),
+ onDeleted: () {},
+ deleteIcon: Icon(Icons.delete),
+ deleteIconColor: Colors.redAccent,
+ deleteButtonTooltipMessage: 'Remove this tag',
+ ),
+ Divider(
+ color: Colors.grey,
+ height: 32.0,
+ // indent: 32.0,
+ ),
+ Wrap(
+ spacing: 8.0,
+ children: _tags.map((tag) {
+ return Chip(
+ label: Text(tag),
+ onDeleted: () {
+ setState(() {
+ _tags.remove(tag);
+ });
+ },
+ );
+ }).toList(),
+ ),
+ Divider(
+ color: Colors.grey,
+ height: 32.0,
+ // indent: 32.0,
+ ),
+ Container(
+ width: double.infinity,
+ child: Text('ActionChip: $_action'),
+ ),
+ Wrap(
+ spacing: 8.0,
+ children: _tags.map((tag) {
+ return ActionChip(
+ label: Text(tag),
+ onPressed: () {
+ setState(() {
+ _action = tag;
+ });
+ },
+ );
+ }).toList(),
+ ),
+ Divider(
+ color: Colors.grey,
+ height: 32.0,
+ // indent: 32.0,
+ ),
+ Container(
+ width: double.infinity,
+ child: Text('FilterChip: ${_selected.toString()}'),
+ ),
+ Wrap(
+ spacing: 8.0,
+ children: _tags.map((tag) {
+ return FilterChip(
+ label: Text(tag),
+ selected: _selected.contains(tag),
+ onSelected: (value) {
+ setState(() {
+ if (_selected.contains(tag)) {
+ _selected.remove(tag);
+ } else {
+ _selected.add(tag);
+ }
+ });
+ },
+ );
+ }).toList(),
+ ),
+ Divider(
+ color: Colors.grey,
+ height: 32.0,
+ // indent: 32.0,
+ ),
+ Container(
+ width: double.infinity,
+ child: Text('ChoiceChip: $_choice'),
+ ),
+ Wrap(
+ spacing: 8.0,
+ children: _tags.map((tag) {
+ return ChoiceChip(
+ label: Text(tag),
+ selectedColor: Colors.black,
+ selected: _choice == tag,
+ onSelected: (value) {
+ setState(() {
+ _choice = tag;
+ });
+ },
+ );
+ }).toList(),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ floatingActionButton: FloatingActionButton(
+ child: Icon(Icons.restore),
+ onPressed: () {
+ setState(() {
+ _tags = [
+ 'Apple',
+ 'Banana',
+ 'Lemon',
+ ];
+
+ _selected = [];
+
+ _choice = 'Lemon';
+ });
+ },
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/data_table_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/data_table_demo.dart
new file mode 100644
index 00000000..2394e974
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/data_table_demo.dart
@@ -0,0 +1,78 @@
+import 'package:flutter/material.dart';
+import '../model/post.dart';
+
+class DataTableDemo extends StatefulWidget {
+ @override
+ _DataTableDemoState createState() => _DataTableDemoState();
+}
+
+class _DataTableDemoState extends State {
+ int _sortColumnIndex;
+ bool _sortAscending = true;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('DataTableDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: ListView(
+ children: [
+ DataTable(
+ sortColumnIndex: _sortColumnIndex,
+ sortAscending: _sortAscending,
+ // onSelectAll: (bool value) {},
+ columns: [
+ DataColumn(
+ label: Text('Title'),
+ onSort: (int index, bool ascending) {
+ setState(() {
+ _sortColumnIndex = index;
+ _sortAscending = ascending;
+
+ posts.sort((a, b) {
+ if (!ascending) {
+ final c = a;
+ a = b;
+ b = c;
+ }
+
+ return a.title.length.compareTo(b.title.length);
+ });
+ });
+ },
+ ),
+ DataColumn(
+ label: Text('Author'),
+ ),
+ DataColumn(
+ label: Text('Image'),
+ ),
+ ],
+ rows: posts.map((post) {
+ return DataRow(
+ selected: post.selected,
+ onSelectChanged: (bool value) {
+ setState(() {
+ if (post.selected != value) {
+ post.selected = value;
+ }
+ });
+ },
+ cells: [
+ DataCell(Text(post.title)),
+ DataCell(Text(post.author)),
+ DataCell(Image.network(post.imageUrl)),
+ ]
+ );
+ }).toList(),
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/datetime_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/datetime_demo.dart
new file mode 100644
index 00000000..c5e0f4ec
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/datetime_demo.dart
@@ -0,0 +1,82 @@
+import 'package:flutter/material.dart';
+import 'package:intl/intl.dart';
+import 'dart:async';
+
+class DateTimeDemo extends StatefulWidget {
+ @override
+ _DateTimeDemoState createState() => _DateTimeDemoState();
+}
+
+class _DateTimeDemoState extends State {
+ DateTime selectedDate = DateTime.now();
+ TimeOfDay selectedTime = TimeOfDay(hour: 9, minute: 30);
+
+ Future _selectDate() async {
+ final DateTime date = await showDatePicker(
+ context: context,
+ initialDate: selectedDate,
+ firstDate: DateTime(1900),
+ lastDate: DateTime(2100),
+ );
+
+ if (date == null) return;
+
+ setState(() {
+ selectedDate = date;
+ });
+ }
+
+ Future _selectTime() async {
+ final TimeOfDay time = await showTimePicker(
+ context: context,
+ initialTime: selectedTime,
+ );
+
+ if (time == null) return;
+
+ setState(() {
+ selectedTime = time;
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('DateTimeDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ InkWell(
+ onTap: _selectDate,
+ child: Row(
+ children: [
+ Text(DateFormat.yMMMMd().format(selectedDate)),
+ Icon(Icons.arrow_drop_down),
+ ],
+ ),
+ ),
+ InkWell(
+ onTap: _selectTime,
+ child: Row(
+ children: [
+ Text(selectedTime.format(context)),
+ Icon(Icons.arrow_drop_down),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/drawer_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/drawer_demo.dart
new file mode 100644
index 00000000..04f738cb
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/drawer_demo.dart
@@ -0,0 +1,58 @@
+import 'package:flutter/material.dart';
+
+class DrawerDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ // TODO: implement build
+ return Drawer(
+ child: ListView(
+ padding: EdgeInsets.zero,
+ children: [
+ UserAccountsDrawerHeader(
+ accountName:
+ Text('wanghao', style: TextStyle(fontWeight: FontWeight.bold)),
+ accountEmail: Text('wanghao@ninghao.net'),
+ currentAccountPicture: CircleAvatar(
+ backgroundImage: NetworkImage(
+ 'https://resources.ninghao.org/images/wanghao.jpg'),
+ ),
+ decoration: BoxDecoration(
+ color: Colors.yellow[400],
+ image: DecorationImage(
+ image: NetworkImage(
+ 'https://resources.ninghao.org/images/childhood-in-a-picture.jpg'),
+ fit: BoxFit.cover,
+ colorFilter: ColorFilter.mode(
+ Colors.yellow[400].withOpacity(0.6), BlendMode.hardLight),
+ ),
+ ),
+ ),
+ ListTile(
+ title: Text(
+ 'Messages',
+ textAlign: TextAlign.right,
+ ),
+ trailing: Icon(Icons.message, color: Colors.black12, size: 22.0),
+ onTap: () => Navigator.pop(context),
+ ),
+ ListTile(
+ title: Text(
+ 'Favorite',
+ textAlign: TextAlign.right,
+ ),
+ trailing: Icon(Icons.favorite, color: Colors.black12, size: 22.0),
+ onTap: () => Navigator.pop(context),
+ ),
+ ListTile(
+ title: Text(
+ 'Settings',
+ textAlign: TextAlign.right,
+ ),
+ trailing: Icon(Icons.settings, color: Colors.black12, size: 22.0),
+ onTap: () => Navigator.pop(context),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/expansion_panel_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/expansion_panel_demo.dart
new file mode 100644
index 00000000..2624fdb7
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/expansion_panel_demo.dart
@@ -0,0 +1,99 @@
+import 'package:flutter/material.dart';
+
+class ExpansionPanelItem {
+ final String headerText;
+ final Widget body;
+ bool isExpanded;
+
+ ExpansionPanelItem({
+ this.headerText,
+ this.body,
+ this.isExpanded,
+ });
+}
+
+class ExpansionPanelDemo extends StatefulWidget {
+ @override
+ _ExpansionPanelDemoState createState() => _ExpansionPanelDemoState();
+}
+
+class _ExpansionPanelDemoState extends State {
+ List _expansionPanelItems;
+
+ @override
+ void initState() {
+ super.initState();
+
+ _expansionPanelItems = [
+ ExpansionPanelItem(
+ headerText: 'Panel A',
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ width: double.infinity,
+ child: Text('Content for Panel A.'),
+ ),
+ isExpanded: false,
+ ),
+ ExpansionPanelItem(
+ headerText: 'Panel B',
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ width: double.infinity,
+ child: Text('Content for Panel B.'),
+ ),
+ isExpanded: false,
+ ),
+ ExpansionPanelItem(
+ headerText: 'Panel C',
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ width: double.infinity,
+ child: Text('Content for Panel C.'),
+ ),
+ isExpanded: false,
+ ),
+ ];
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('ExpansionPanelDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ ExpansionPanelList(
+ expansionCallback: (int panelIndex, bool isExpanded) {
+ setState(() {
+ _expansionPanelItems[panelIndex].isExpanded = !isExpanded;
+ });
+ },
+ children: _expansionPanelItems.map(
+ (ExpansionPanelItem item) {
+ return ExpansionPanel(
+ isExpanded: item.isExpanded,
+ body: item.body,
+ headerBuilder: (BuildContext context, bool isExpanded) {
+ return Container(
+ padding: EdgeInsets.all(16.0),
+ child: Text(
+ item.headerText,
+ style: Theme.of(context).textTheme.title,
+ ),
+ );
+ },
+ );
+ }
+ ).toList(),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/floating_action_button_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/floating_action_button_demo.dart
new file mode 100644
index 00000000..a5ad148e
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/floating_action_button_demo.dart
@@ -0,0 +1,37 @@
+import 'package:flutter/material.dart';
+
+class FloatingActionButtonDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ final Widget _floatingActionButton = FloatingActionButton(
+ onPressed: () {},
+ child: Icon(Icons.add),
+ elevation: 0.0,
+ backgroundColor: Colors.black87,
+ // shape: BeveledRectangleBorder(
+ // borderRadius: BorderRadius.circular(30.0)
+ // ),
+ );
+
+ final Widget _floatingActionButtonExtended = FloatingActionButton.extended(
+ onPressed: () {},
+ icon: Icon(Icons.add),
+ label: Text('Add'),
+ );
+
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('FloatingActionButtonDemo'),
+ elevation: 0.0,
+ ),
+ floatingActionButton: _floatingActionButton,
+ floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
+ bottomNavigationBar: BottomAppBar(
+ child: Container(
+ height: 80.0,
+ ),
+ shape: CircularNotchedRectangle(),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/form_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/form_demo.dart
new file mode 100644
index 00000000..9caea518
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/form_demo.dart
@@ -0,0 +1,173 @@
+import 'package:flutter/material.dart';
+
+class FormDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('FormDemo'),
+ elevation: 0.0,
+ ),
+ body: Theme(
+ data: Theme.of(context).copyWith(
+ primaryColor: Colors.black,
+ ),
+ child: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ RegisterForm(),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class RegisterForm extends StatefulWidget {
+ @override
+ RegisterFormState createState() => RegisterFormState();
+}
+
+class RegisterFormState extends State {
+ final registerFormKey = GlobalKey();
+ String username, password;
+ bool autovalidate = false;
+
+ void submitRegisterForm() {
+ if (registerFormKey.currentState.validate()) {
+ registerFormKey.currentState.save();
+
+ debugPrint('username: $username');
+ debugPrint('password: $password');
+
+ Scaffold.of(context).showSnackBar(
+ SnackBar(
+ content: Text('Registering...'),
+ )
+ );
+ } else {
+ setState(() {
+ autovalidate = true;
+ });
+ }
+ }
+
+ String validateUsername(value) {
+ if (value.isEmpty) {
+ return 'Username is required.';
+ }
+
+ return null;
+ }
+
+ String validatePassword(value) {
+ if (value.isEmpty) {
+ return 'Password is required.';
+ }
+
+ return null;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Form(
+ key: registerFormKey,
+ child: Column(
+ children: [
+ TextFormField(
+ decoration: InputDecoration(
+ labelText: 'Username',
+ helperText: '',
+ ),
+ onSaved: (value) {
+ username = value;
+ },
+ validator: validateUsername,
+ autovalidate: autovalidate,
+ ),
+ TextFormField(
+ obscureText: true,
+ decoration: InputDecoration(
+ labelText: 'Password',
+ helperText: '',
+ ),
+ onSaved: (value) {
+ password = value;
+ },
+ validator: validatePassword,
+ autovalidate: autovalidate,
+ ),
+ SizedBox(height: 32.0,),
+ Container(
+ width: double.infinity,
+ child: RaisedButton(
+ color: Theme.of(context).accentColor,
+ child: Text('Register', style: TextStyle(color: Colors.white)),
+ elevation: 0.0,
+ onPressed: submitRegisterForm,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class TextFieldDemo extends StatefulWidget {
+ @override
+ TextFieldDemoState createState() => TextFieldDemoState();
+}
+
+class TextFieldDemoState extends State {
+ final textEditingController = TextEditingController();
+
+ @override
+ void dispose() {
+ textEditingController.dispose();
+ super.dispose();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ // textEditingController.text = 'hi';
+ textEditingController.addListener(
+ () {
+ debugPrint('input: ${textEditingController.text}');
+ }
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return TextField(
+ controller: textEditingController,
+ // onChanged: (value) {
+ // debugPrint('input: $value');
+ // },
+ onSubmitted: (value) {
+ debugPrint('submit: $value');
+ },
+ decoration: InputDecoration(
+ icon: Icon(Icons.subject),
+ labelText: 'Title',
+ hintText: 'Enter the post title.',
+ // border: InputBorder.none,
+ // border: OutlineInputBorder(),
+ filled: true,
+ ),
+ );
+ }
+}
+
+class ThemeDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ color: Theme.of(context).accentColor,
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/hello_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/hello_demo.dart
new file mode 100644
index 00000000..de8f67b7
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/hello_demo.dart
@@ -0,0 +1,18 @@
+import 'package:flutter/material.dart';
+
+class Hello extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Center(
+ child: Text(
+ 'hello',
+ textDirection: TextDirection.ltr,
+ style: TextStyle(
+ fontSize: 40.0,
+ fontWeight: FontWeight.bold,
+ color: Colors.black87,
+ )
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/http/http_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/http/http_demo.dart
new file mode 100644
index 00000000..3a5e1cde
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/http/http_demo.dart
@@ -0,0 +1,129 @@
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:http/http.dart' as http;
+import 'dart:async';
+
+class HttpDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('HttpDemo'),
+ elevation: 0.0,
+ ),
+ body: HttpDemoHome(),
+ );
+ }
+}
+
+class HttpDemoHome extends StatefulWidget {
+ @override
+ _HttpDemoHomeState createState() => _HttpDemoHomeState();
+}
+
+class _HttpDemoHomeState extends State {
+ @override
+ void initState() {
+ super.initState();
+ // fetchPosts()
+ // .then((value) => print(value));
+
+ // final post = {
+ // 'title': 'hello',
+ // 'description': 'nice to meet you.',
+ // };
+
+ // print(post['title']);
+ // print(post['description']);
+
+ // final postJson = json.encode(post);
+ // print(postJson);
+
+ // final postJsonConverted = json.decode(postJson);
+ // print(postJsonConverted['title']);
+ // print(postJsonConverted['description']);
+ // print(postJsonConverted is Map);
+
+ // final postModel = Post.fromJson(postJsonConverted);
+ // print('title: ${postModel.title}, description: ${postModel.description}');
+
+ // print('${json.encode(postModel)}');
+ }
+
+ Future> fetchPosts() async {
+ final response =
+ await http.get('https://resources.ninghao.net/demo/posts.json');
+
+ // print('statusCode: ${response.statusCode}');
+ // print('body: ${response.body}');
+
+ if (response.statusCode == 200) {
+ final responseBody = json.decode(response.body);
+ List posts = responseBody['posts']
+ .map((item) => Post.fromJson(item))
+ .toList();
+
+ return posts;
+ } else {
+ throw Exception('Failed to fetch posts.');
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return FutureBuilder(
+ future: fetchPosts(),
+ builder: (BuildContext context, AsyncSnapshot snapshot) {
+ print('data: ${snapshot.data}');
+ print('connectionState: ${snapshot.connectionState}');
+
+ if (snapshot.connectionState == ConnectionState.waiting) {
+ return Center(
+ child: Text('loading...'),
+ );
+ }
+
+ return ListView(
+ children: snapshot.data.map((item) {
+ return ListTile(
+ title: Text(item.title),
+ subtitle: Text(item.author),
+ leading: CircleAvatar(
+ backgroundImage: NetworkImage(item.imageUrl),
+ ),
+ );
+ }).toList(),
+ );
+ },
+ );
+ }
+}
+
+class Post {
+ final int id;
+ final String title;
+ final String description;
+ final String author;
+ final String imageUrl;
+
+ Post(
+ this.id,
+ this.title,
+ this.description,
+ this.author,
+ this.imageUrl,
+ );
+
+ Post.fromJson(Map json)
+ : id = json['id'],
+ title = json['title'],
+ description = json['description'],
+ author = json['author'],
+ imageUrl = json['imageUrl'];
+
+ Map toJson() => {
+ 'title': title,
+ 'descritpion': description,
+ };
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/i18n_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/i18n_demo.dart
new file mode 100644
index 00000000..8a4877b9
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/i18n_demo.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+// import 'package:ninghao_flutter/demo/i18n/map/ninghao_demo_localizations.dart';
+import 'package:ninghao_flutter/demo/i18n/intl/ninghao_demo_localizations.dart';
+
+class I18nDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ Locale locale = Localizations.localeOf(context);
+
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('I18nDemo'),
+ elevation: 0.0,
+ ),
+ body: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(locale.toString()),
+ Text(
+ // Localizations.of(context, NinghaoDemoLocalizations).title,
+ // NinghaoDemoLocalizations.of(context).title,
+ NinghaoDemoLocalizations.of(context).greet('ninghao'),
+ style: Theme.of(context).textTheme.title,
+ )
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_en.arb b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_en.arb
new file mode 100644
index 00000000..15d5b6f2
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_en.arb
@@ -0,0 +1,17 @@
+{
+ "@@last_modified": "2018-10-19T15:45:15.386436",
+ "title": "hello",
+ "@title": {
+ "description": "demo localizations.",
+ "type": "text",
+ "placeholders": {}
+ },
+ "greet": "hello {name}",
+ "@greet": {
+ "description": "greet someone.",
+ "type": "text",
+ "placeholders": {
+ "name": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_messages.arb b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_messages.arb
new file mode 100644
index 00000000..15d5b6f2
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_messages.arb
@@ -0,0 +1,17 @@
+{
+ "@@last_modified": "2018-10-19T15:45:15.386436",
+ "title": "hello",
+ "@title": {
+ "description": "demo localizations.",
+ "type": "text",
+ "placeholders": {}
+ },
+ "greet": "hello {name}",
+ "@greet": {
+ "description": "greet someone.",
+ "type": "text",
+ "placeholders": {
+ "name": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_zh.arb b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_zh.arb
new file mode 100644
index 00000000..1e602a43
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/intl_zh.arb
@@ -0,0 +1,17 @@
+{
+ "@@last_modified": "2018-10-19T15:45:15.386436",
+ "title": "您好",
+ "@title": {
+ "description": "演示本地化",
+ "type": "text",
+ "placeholders": {}
+ },
+ "greet": "您好 {name}",
+ "@greet": {
+ "description": "问候某人",
+ "type": "text",
+ "placeholders": {
+ "name": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_localizations.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_localizations.dart
new file mode 100644
index 00000000..3275282a
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_localizations.dart
@@ -0,0 +1,57 @@
+import 'package:flutter/material.dart';
+import 'package:intl/intl.dart';
+import 'ninghao_demo_messages_all.dart';
+
+class NinghaoDemoLocalizations {
+ static NinghaoDemoLocalizations of(BuildContext context) {
+ return Localizations.of(
+ context,
+ NinghaoDemoLocalizations
+ );
+ }
+
+ static Future load(Locale locale) {
+ final String name =
+ locale.countryCode.isEmpty ? locale.languageCode : locale.toString();
+
+ final String localeName = Intl.canonicalizedLocale(name);
+
+ return initializeMessages(localeName).then((bool _) {
+ Intl.defaultLocale = localeName;
+ return NinghaoDemoLocalizations();
+ });
+ }
+
+ String get title => Intl.message(
+ 'hello',
+ name: 'title',
+ desc: 'demo localizations.',
+ );
+
+ String greet(String name) => Intl.message(
+ 'hello $name',
+ name: 'greet',
+ desc: 'greet someone.',
+ args: [name],
+ );
+}
+
+class NinghaoDemoLocalizationsDelegate
+ extends LocalizationsDelegate {
+ NinghaoDemoLocalizationsDelegate();
+
+ @override
+ Future load(Locale locale) {
+ return NinghaoDemoLocalizations.load(locale);
+ }
+
+ @override
+ bool isSupported(Locale locale) {
+ return true;
+ }
+
+ @override
+ bool shouldReload(LocalizationsDelegate old) {
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_all.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_all.dart
new file mode 100644
index 00000000..548ef28c
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_all.dart
@@ -0,0 +1,72 @@
+// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
+// This is a library that looks up messages for specific locales by
+// delegating to the appropriate library.
+
+import 'dart:async';
+
+import 'package:intl/intl.dart';
+import 'package:intl/message_lookup_by_library.dart';
+// ignore: implementation_imports
+import 'package:intl/src/intl_helpers.dart';
+
+import 'ninghao_demo_messages_en.dart' as messages_en;
+import 'ninghao_demo_messages_messages.dart' as messages_messages;
+import 'ninghao_demo_messages_zh.dart' as messages_zh;
+
+typedef Future LibraryLoader();
+Map _deferredLibraries = {
+// ignore: unnecessary_new
+ 'en': () => new Future.value(null),
+// ignore: unnecessary_new
+ 'messages': () => new Future.value(null),
+// ignore: unnecessary_new
+ 'zh': () => new Future.value(null),
+};
+
+MessageLookupByLibrary _findExact(localeName) {
+ switch (localeName) {
+ case 'en':
+ return messages_en.messages;
+ case 'messages':
+ return messages_messages.messages;
+ case 'zh':
+ return messages_zh.messages;
+ default:
+ return null;
+ }
+}
+
+/// User programs should call this before using [localeName] for messages.
+Future initializeMessages(String localeName) async {
+ var availableLocale = Intl.verifiedLocale(
+ localeName,
+ (locale) => _deferredLibraries[locale] != null,
+ onFailure: (_) => null);
+ if (availableLocale == null) {
+ // ignore: unnecessary_new
+ return new Future.value(false);
+ }
+ var lib = _deferredLibraries[availableLocale];
+ // ignore: unnecessary_new
+ await (lib == null ? new Future.value(false) : lib());
+ // ignore: unnecessary_new
+ initializeInternalMessageLookup(() => new CompositeMessageLookup());
+ messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
+ // ignore: unnecessary_new
+ return new Future.value(true);
+}
+
+bool _messagesExistFor(String locale) {
+ try {
+ return _findExact(locale) != null;
+ } catch (e) {
+ return false;
+ }
+}
+
+MessageLookupByLibrary _findGeneratedMessagesFor(locale) {
+ var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
+ onFailure: (_) => null);
+ if (actualLocale == null) return null;
+ return _findExact(actualLocale);
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_en.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_en.dart
new file mode 100644
index 00000000..50e6cecc
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_en.dart
@@ -0,0 +1,28 @@
+// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
+// This is a library that provides messages for a en locale. All the
+// messages from the main program should be duplicated here with the same
+// function name.
+
+import 'package:intl/intl.dart';
+import 'package:intl/message_lookup_by_library.dart';
+
+// ignore: unnecessary_new
+final messages = new MessageLookup();
+
+// ignore: unused_element
+final _keepAnalysisHappy = Intl.defaultLocale;
+
+// ignore: non_constant_identifier_names
+typedef MessageIfAbsent(String message_str, List args);
+
+class MessageLookup extends MessageLookupByLibrary {
+ get localeName => 'en';
+
+ static m0(name) => "hello ${name}";
+
+ final messages = _notInlinedMessages(_notInlinedMessages);
+ static _notInlinedMessages(_) => {
+ "greet" : m0,
+ "title" : MessageLookupByLibrary.simpleMessage("hello")
+ };
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_messages.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_messages.dart
new file mode 100644
index 00000000..33b8e3b0
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_messages.dart
@@ -0,0 +1,28 @@
+// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
+// This is a library that provides messages for a messages locale. All the
+// messages from the main program should be duplicated here with the same
+// function name.
+
+import 'package:intl/intl.dart';
+import 'package:intl/message_lookup_by_library.dart';
+
+// ignore: unnecessary_new
+final messages = new MessageLookup();
+
+// ignore: unused_element
+final _keepAnalysisHappy = Intl.defaultLocale;
+
+// ignore: non_constant_identifier_names
+typedef MessageIfAbsent(String message_str, List args);
+
+class MessageLookup extends MessageLookupByLibrary {
+ get localeName => 'messages';
+
+ static m0(name) => "hello ${name}";
+
+ final messages = _notInlinedMessages(_notInlinedMessages);
+ static _notInlinedMessages(_) => {
+ "greet" : m0,
+ "title" : MessageLookupByLibrary.simpleMessage("hello")
+ };
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_zh.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_zh.dart
new file mode 100644
index 00000000..29786aa9
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/intl/ninghao_demo_messages_zh.dart
@@ -0,0 +1,28 @@
+// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
+// This is a library that provides messages for a zh locale. All the
+// messages from the main program should be duplicated here with the same
+// function name.
+
+import 'package:intl/intl.dart';
+import 'package:intl/message_lookup_by_library.dart';
+
+// ignore: unnecessary_new
+final messages = new MessageLookup();
+
+// ignore: unused_element
+final _keepAnalysisHappy = Intl.defaultLocale;
+
+// ignore: non_constant_identifier_names
+typedef MessageIfAbsent(String message_str, List args);
+
+class MessageLookup extends MessageLookupByLibrary {
+ get localeName => 'zh';
+
+ static m0(name) => "您好 ${name}";
+
+ final messages = _notInlinedMessages(_notInlinedMessages);
+ static _notInlinedMessages(_) => {
+ "greet" : m0,
+ "title" : MessageLookupByLibrary.simpleMessage("您好")
+ };
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/map/ninghao_demo_localizations.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/map/ninghao_demo_localizations.dart
new file mode 100644
index 00000000..3f5e75b3
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/i18n/map/ninghao_demo_localizations.dart
@@ -0,0 +1,49 @@
+import 'package:flutter/foundation.dart' show SynchronousFuture;
+import 'package:flutter/material.dart';
+
+class NinghaoDemoLocalizations {
+ final Locale locale;
+
+ NinghaoDemoLocalizations(this.locale);
+
+ static NinghaoDemoLocalizations of(BuildContext context) {
+ return Localizations.of(
+ context,
+ NinghaoDemoLocalizations
+ );
+ }
+
+ static Map> _localized = {
+ 'en': {
+ 'title': 'hello',
+ },
+ 'zh': {
+ 'title': '您好',
+ }
+ };
+
+ String get title {
+ return _localized[locale.languageCode]['title'];
+ }
+}
+
+class NinghaoDemoLocalizationsDelegate
+ extends LocalizationsDelegate {
+ NinghaoDemoLocalizationsDelegate();
+
+ @override
+ Future load(Locale locale) {
+ return SynchronousFuture(
+ NinghaoDemoLocalizations(locale));
+ }
+
+ @override
+ bool isSupported(Locale locale) {
+ return true;
+ }
+
+ @override
+ bool shouldReload(LocalizationsDelegate old) {
+ return false;
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/layout_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/layout_demo.dart
new file mode 100644
index 00000000..386e305f
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/layout_demo.dart
@@ -0,0 +1,134 @@
+import 'package:flutter/material.dart';
+
+class LayoutDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ StackDemo(),
+ ],
+ ),
+ );
+ }
+}
+
+class ConstrainedBoxDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return ConstrainedBox(
+ constraints: BoxConstraints(
+ minHeight: 200.0,
+ maxWidth: 200.0,
+ ),
+ child: Container(
+ color: Color.fromRGBO(3, 54, 255, 1.0),
+ ),
+ );
+ }
+}
+
+class AspectRatioDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return AspectRatio(
+ aspectRatio: 16.0 / 9.0,
+ child: Container(
+ color: Color.fromRGBO(3, 54, 255, 1.0),
+ ),
+ );
+ }
+}
+
+class StackDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Stack(
+ alignment: Alignment.topLeft,
+ children: [
+ SizedBox(
+ width: 200.0,
+ height: 300.0,
+ child: Container(
+ alignment: Alignment(0.0, -0.9),
+ decoration: BoxDecoration(
+ color: Color.fromRGBO(3, 54, 255, 1.0),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
+ ),
+ SizedBox(
+ height: 32.0,
+ ),
+ SizedBox(
+ width: 100.0,
+ height: 100.0,
+ child: Container(
+ decoration: BoxDecoration(
+ color: Color.fromRGBO(3, 54, 255, 1.0),
+ shape: BoxShape.circle,
+ gradient: RadialGradient(colors: [
+ Color.fromRGBO(7, 102, 255, 1.0),
+ Color.fromRGBO(3, 54, 255, 1.0),
+ ]),
+ ),
+ child: Icon(Icons.brightness_2, color: Colors.white, size: 32.0),
+ ),
+ ),
+ Positioned(
+ right: 20.0,
+ top: 20.0,
+ child: Icon(Icons.ac_unit, color: Colors.white, size: 16.0),
+ ),
+ Positioned(
+ right: 40.0,
+ top: 60.0,
+ child: Icon(Icons.ac_unit, color: Colors.white, size: 18.0),
+ ),
+ Positioned(
+ right: 20.0,
+ top: 120.0,
+ child: Icon(Icons.ac_unit, color: Colors.white, size: 20.0),
+ ),
+ Positioned(
+ right: 70.0,
+ top: 180.0,
+ child: Icon(Icons.ac_unit, color: Colors.white, size: 16.0),
+ ),
+ Positioned(
+ right: 30.0,
+ top: 230.0,
+ child: Icon(Icons.ac_unit, color: Colors.white, size: 18.0),
+ ),
+ Positioned(
+ right: 90.0,
+ bottom: 20.0,
+ child: Icon(Icons.ac_unit, color: Colors.white, size: 16.0),
+ ),
+ Positioned(
+ right: 4.0,
+ bottom: -4.0,
+ child: Icon(Icons.ac_unit, color: Colors.white, size: 16.0),
+ ),
+ ],
+ );
+ }
+}
+
+class IconBadge extends StatelessWidget {
+ final IconData icon;
+ final double size;
+
+ IconBadge(this.icon, {this.size = 32.0});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ child: Icon(icon, size: size, color: Colors.white),
+ width: size + 60,
+ height: size + 60,
+ color: Color.fromRGBO(3, 54, 255, 1.0),
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/listview_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/listview_demo.dart
new file mode 100644
index 00000000..c353d923
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/listview_demo.dart
@@ -0,0 +1,57 @@
+import 'package:flutter/material.dart';
+import './post_show.dart';
+import '../model/post.dart';
+
+class ListViewDemo extends StatelessWidget {
+ Widget _listItemBuilder(BuildContext context, int index) {
+ return Container(
+ color: Colors.white,
+ margin: EdgeInsets.all(8.0),
+ child: Stack(
+ children: [
+ Column(
+ children: [
+ AspectRatio(
+ aspectRatio: 16/9,
+ child: Image.network(posts[index].imageUrl, fit: BoxFit.cover),
+ ),
+ SizedBox(height: 16.0),
+ Text(
+ posts[index].title,
+ style: Theme.of(context).textTheme.title
+ ),
+ Text(
+ posts[index].author,
+ style: Theme.of(context).textTheme.subhead
+ ),
+ SizedBox(height: 16.0),
+ ],
+ ),
+ Positioned.fill(
+ child: Material(
+ color: Colors.transparent,
+ child: InkWell(
+ splashColor: Colors.white.withOpacity(0.3),
+ highlightColor: Colors.white.withOpacity(0.1),
+ onTap: () {
+ Navigator.of(context).push(
+ MaterialPageRoute(builder: (context) => PostShow(post: posts[index]))
+ );
+ }
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ // TODO: implement build
+ return ListView.builder(
+ itemCount: posts.length,
+ itemBuilder: _listItemBuilder,
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/material_components.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/material_components.dart
new file mode 100644
index 00000000..e1515365
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/material_components.dart
@@ -0,0 +1,103 @@
+import 'package:flutter/material.dart';
+import './button_demo.dart';
+import './floating_action_button_demo.dart';
+import './popup_menu_button_demo.dart';
+import './form_demo.dart';
+import './checkbox_demo.dart';
+import './radio_demo.dart';
+import './switch_demo.dart';
+import './slider_demo.dart';
+import './datetime_demo.dart';
+import './simple_dialog_demo.dart';
+import './alert_dialog_demo.dart';
+import './bottom_sheet_demo.dart';
+import './snack_bar_demo.dart';
+import './expansion_panel_demo.dart';
+import './chip_demo.dart';
+import './data_table_demo.dart';
+import './paginated_data_table_demo.dart';
+import './card_demo.dart';
+import './stepper_demo.dart';
+
+class MaterialComponents extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('MaterialComponents'),
+ elevation: 0.0,
+ ),
+ body: ListView(
+ children: [
+ ListItem(title: 'Stepper', page: StepperDemo()),
+ ListItem(title: 'Card', page: CardDemo()),
+ ListItem(title: 'PaginatedDataTable', page: PaginatedDataTableDemo()),
+ ListItem(title: 'DataTable', page: DataTableDemo()),
+ ListItem(title: 'Chip', page: ChipDemo()),
+ ListItem(title: 'ExpansionPanel', page: ExpansionPanelDemo()),
+ ListItem(title: 'SnackBar', page: SnackBarDemo()),
+ ListItem(title: 'BottomSheet', page: BottomSheetDemo()),
+ ListItem(title: 'AlertDialog', page: AlertDialogDemo()),
+ ListItem(title: 'SimpleDialog', page: SimpleDialogDemo()),
+ ListItem(title: 'Date & Time', page: DateTimeDemo()),
+ ListItem(title: 'Slider', page: SliderDemo()),
+ ListItem(title: 'Switch', page: SwitchDemo()),
+ ListItem(title: 'Radio', page: RadioDemo()),
+ ListItem(title: 'Checkbox', page: CheckboxDemo()),
+ ListItem(title: 'Form', page: FormDemo()),
+ ListItem(title: 'PopupMenuButton', page: PopupMenuButtonDemo()),
+ ListItem(title: 'Button', page: ButtonDemo()),
+ ListItem(title: 'FloatingActionButton', page: FloatingActionButtonDemo()),
+ ],
+ ),
+ );
+ }
+}
+
+class _WidgetDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('_WidgetDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+
+ ],
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
+
+class ListItem extends StatelessWidget {
+ final String title;
+ final Widget page;
+
+ ListItem({
+ this.title,
+ this.page,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return ListTile(
+ title: Text(title),
+ onTap: () {
+ Navigator.of(context).push(
+ MaterialPageRoute(builder: (context) => page),
+ );
+ },
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/navigator_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/navigator_demo.dart
new file mode 100644
index 00000000..50a11323
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/navigator_demo.dart
@@ -0,0 +1,50 @@
+import 'package:flutter/material.dart';
+
+class NavigatorDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: Center(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ FlatButton(
+ child: Text('Home'),
+ onPressed: null,
+ ),
+ FlatButton(
+ child: Text('About'),
+ onPressed: () {
+ Navigator.pushNamed(context, '/about');
+ },
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class Page extends StatelessWidget {
+ final String title;
+
+ Page({
+ this.title
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text(title),
+ elevation: 0.0,
+ ),
+ floatingActionButton: FloatingActionButton(
+ child: Icon(Icons.arrow_back),
+ onPressed: () {
+ Navigator.pop(context);
+ },
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/paginated_data_table_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/paginated_data_table_demo.dart
new file mode 100644
index 00000000..052ff125
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/paginated_data_table_demo.dart
@@ -0,0 +1,102 @@
+import 'package:flutter/material.dart';
+import '../model/post.dart';
+
+class PostDataSource extends DataTableSource {
+ final List _posts = posts;
+ int _selectedCount = 0;
+
+ @override
+ int get rowCount => _posts.length;
+
+ @override
+ bool get isRowCountApproximate => false;
+
+ @override
+ int get selectedRowCount => _selectedCount;
+
+ @override
+ DataRow getRow(int index) {
+ final Post post = _posts[index];
+
+ return DataRow.byIndex(
+ index: index,
+ cells: [
+ DataCell(Text(post.title)),
+ DataCell(Text(post.author)),
+ DataCell(Image.network(post.imageUrl)),
+ ],
+ );
+ }
+
+ void _sort(getField(post), bool ascending) {
+ _posts.sort((a, b) {
+ if (!ascending) {
+ final c = a;
+ a = b;
+ b = c;
+ }
+
+ final aValue = getField(a);
+ final bValue = getField(b);
+
+ return Comparable.compare(aValue, bValue);
+ });
+
+ notifyListeners();
+ }
+}
+
+class PaginatedDataTableDemo extends StatefulWidget {
+ @override
+ _PaginatedDataTableDemoState createState() => _PaginatedDataTableDemoState();
+}
+
+class _PaginatedDataTableDemoState extends State {
+ int _sortColumnIndex;
+ bool _sortAscending = true;
+
+ final PostDataSource _postsDataSource = PostDataSource();
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('PaginatedDataTableDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: ListView(
+ children: [
+ PaginatedDataTable(
+ header: Text('Posts'),
+ rowsPerPage: 5,
+ source: _postsDataSource,
+ sortColumnIndex: _sortColumnIndex,
+ sortAscending: _sortAscending,
+ // onSelectAll: (bool value) {},
+ columns: [
+ DataColumn(
+ label: Text('Title'),
+ onSort: (int columnIndex, bool ascending) {
+ _postsDataSource._sort((post) => post.title.length, ascending);
+
+ setState(() {
+ _sortColumnIndex = columnIndex;
+ _sortAscending = ascending;
+ });
+ },
+ ),
+ DataColumn(
+ label: Text('Author'),
+ ),
+ DataColumn(
+ label: Text('Image'),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ));
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/popup_menu_button_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/popup_menu_button_demo.dart
new file mode 100644
index 00000000..70e046a4
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/popup_menu_button_demo.dart
@@ -0,0 +1,56 @@
+import 'package:flutter/material.dart';
+
+class PopupMenuButtonDemo extends StatefulWidget {
+ @override
+ _PopupMenuButtonDemoState createState() => _PopupMenuButtonDemoState();
+}
+
+class _PopupMenuButtonDemoState extends State {
+ String _currentMenuItem = 'Home';
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('PopupMenuButtonDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(_currentMenuItem),
+ PopupMenuButton(
+ onSelected: (value) {
+ print(value);
+ setState(() {
+ _currentMenuItem = value;
+ });
+ },
+ itemBuilder: (BuildContext context) => [
+ PopupMenuItem(
+ value: 'Home',
+ child: Text('Home'),
+ ),
+ PopupMenuItem(
+ value: 'Discover',
+ child: Text('Discover'),
+ ),
+ PopupMenuItem(
+ value: 'Community',
+ child: Text('Community'),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/post_show.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/post_show.dart
new file mode 100644
index 00000000..ec4a90ce
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/post_show.dart
@@ -0,0 +1,40 @@
+import 'package:flutter/material.dart';
+import '../model/post.dart';
+
+class PostShow extends StatelessWidget {
+ final Post post;
+
+ PostShow({
+ @required this.post,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('${post.title}'),
+ elevation: 0.0,
+ ),
+ body: Column(
+ children: [
+ Image.network(
+ post.imageUrl
+ ),
+ Container(
+ padding: EdgeInsets.all(32.0),
+ width: double.infinity,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text('${post.title}', style: Theme.of(context).textTheme.title),
+ Text('${post.author}', style: Theme.of(context).textTheme.subhead),
+ SizedBox(height: 32.0),
+ Text('${post.description}', style: Theme.of(context).textTheme.body1),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/radio_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/radio_demo.dart
new file mode 100644
index 00000000..e082174c
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/radio_demo.dart
@@ -0,0 +1,71 @@
+import 'package:flutter/material.dart';
+
+class RadioDemo extends StatefulWidget {
+ @override
+ _RadioDemoState createState() => _RadioDemoState();
+}
+
+class _RadioDemoState extends State {
+ int _radioGroupA = 0;
+
+ void _handleRadioValueChanged(int value) {
+ setState(() {
+ _radioGroupA = value;
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('RadioDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text('RadioGroupValue: $_radioGroupA'),
+ SizedBox(height: 32.0),
+ RadioListTile(
+ value: 0,
+ groupValue: _radioGroupA,
+ onChanged: _handleRadioValueChanged,
+ title: Text('Options A'),
+ subtitle: Text('Description'),
+ secondary: Icon(Icons.filter_1),
+ selected: _radioGroupA == 0,
+ ),
+ RadioListTile(
+ value: 1,
+ groupValue: _radioGroupA,
+ onChanged: _handleRadioValueChanged,
+ title: Text('Options B'),
+ subtitle: Text('Description'),
+ secondary: Icon(Icons.filter_2),
+ selected: _radioGroupA == 1,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ // Radio(
+ // value: 0,
+ // groupValue: _radioGroupA,
+ // onChanged: _handleRadioValueChanged,
+ // activeColor: Colors.black,
+ // ),
+ // Radio(
+ // value: 1,
+ // groupValue: _radioGroupA,
+ // onChanged: _handleRadioValueChanged,
+ // activeColor: Colors.black,
+ // ),
+ ],
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/rxdart/rxdart_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/rxdart/rxdart_demo.dart
new file mode 100644
index 00000000..d77ae91c
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/rxdart/rxdart_demo.dart
@@ -0,0 +1,86 @@
+import 'package:flutter/material.dart';
+import 'package:rxdart/rxdart.dart';
+import 'dart:async';
+
+class RxDartDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('RxDartDemo'),
+ elevation: 0.0,
+ ),
+ body: RxDartDemoHome(),
+ );
+ }
+}
+
+class RxDartDemoHome extends StatefulWidget {
+ @override
+ _RxDartDemoHomeState createState() => _RxDartDemoHomeState();
+}
+
+class _RxDartDemoHomeState extends State {
+ PublishSubject _textFieldSubject;
+
+ @override
+ void initState() {
+ super.initState();
+
+ _textFieldSubject = PublishSubject();
+
+ _textFieldSubject
+ // .map((item) => 'item: $item')
+ // .where((item) => item.length > 9)
+ .debounce(Duration(milliseconds: 500))
+ .listen((data) => print(data));
+
+ // Observable _observable =
+ // // Observable(Stream.fromIterable(['hello', '您好']));
+ // // Observable.fromFuture(Future.value('hello ~'));
+ // // Observable.fromIterable(['hello', '您好']);
+ // // Observable.just('hello ~');
+ // Observable.periodic(Duration(seconds: 3), (x) => x.toString());
+
+ // _observable.listen(print);
+
+ // PublishSubject _subject = PublishSubject();
+ // BehaviorSubject _subject = BehaviorSubject();
+ // ReplaySubject _subject = ReplaySubject(maxSize: 2);
+
+ // _subject.add('hello');
+ // _subject.add('hola');
+ // _subject.add('hi');
+ // _subject.listen((data) => print('listen 1: $data'));
+ // _subject.listen((data) => print('listen 2: ${data.toUpperCase()}'));
+
+ // _subject.close();
+ }
+
+ @override
+ void dispose() {
+ super.dispose();
+ _textFieldSubject.close();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Theme(
+ data: Theme.of(context).copyWith(
+ primaryColor: Colors.black,
+ ),
+ child: TextField(
+ onChanged: (value) {
+ _textFieldSubject.add('input: $value');
+ },
+ onSubmitted: (value) {
+ _textFieldSubject.add('submit: $value');
+ },
+ decoration: InputDecoration(
+ labelText: 'Title',
+ filled: true,
+ ),
+ ),
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/simple_dialog_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/simple_dialog_demo.dart
new file mode 100644
index 00000000..c183f90e
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/simple_dialog_demo.dart
@@ -0,0 +1,93 @@
+import 'package:flutter/material.dart';
+import 'dart:async';
+
+enum Option {
+ A, B, C
+}
+
+class SimpleDialogDemo extends StatefulWidget {
+ @override
+ _SimpleDialogDemoState createState() => _SimpleDialogDemoState();
+}
+
+class _SimpleDialogDemoState extends State {
+ String _choice = 'Nothing';
+
+ Future _openSimpleDialog() async {
+ final option = await showDialog(
+ context: context,
+ builder: (BuildContext context) {
+ return SimpleDialog(
+ title: Text('SimpleDialog'),
+ children: [
+ SimpleDialogOption(
+ child: Text('Option A'),
+ onPressed: () {
+ Navigator.pop(context, Option.A);
+ },
+ ),
+ SimpleDialogOption(
+ child: Text('Option B'),
+ onPressed: () {
+ Navigator.pop(context, Option.B);
+ },
+ ),
+ SimpleDialogOption(
+ child: Text('Option C'),
+ onPressed: () {
+ Navigator.pop(context, Option.C);
+ },
+ ),
+ ],
+ );
+ }
+ );
+
+ switch (option) {
+ case Option.A:
+ setState(() {
+ _choice = 'A';
+ });
+ break;
+ case Option.B:
+ setState(() {
+ _choice = 'B';
+ });
+ break;
+ case Option.C:
+ setState(() {
+ _choice = 'C';
+ });
+ break;
+ default:
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('SimpleDialogDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text('Your choice is: $_choice'),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ ],
+ ),
+ ],
+ ),
+ ),
+ floatingActionButton: FloatingActionButton(
+ child: Icon(Icons.format_list_numbered),
+ onPressed: _openSimpleDialog,
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/slider_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/slider_demo.dart
new file mode 100644
index 00000000..330706d2
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/slider_demo.dart
@@ -0,0 +1,49 @@
+import 'package:flutter/material.dart';
+
+class SliderDemo extends StatefulWidget {
+ @override
+ _SliderDemoState createState() => _SliderDemoState();
+}
+
+class _SliderDemoState extends State {
+ double _sliderItemA = 0.0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('SliderDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Slider(
+ value: _sliderItemA,
+ onChanged: (value) {
+ setState(() {
+ _sliderItemA = value;
+ });
+ },
+ activeColor: Theme.of(context).accentColor,
+ inactiveColor: Theme.of(context).accentColor.withOpacity(0.3),
+ min: 0.0,
+ max: 10.0,
+ divisions: 10,
+ label: '${_sliderItemA.toInt()}',
+ ),
+ ],
+ ),
+ SizedBox(height: 16.0,),
+ Text('SliderValue: $_sliderItemA'),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/sliver_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/sliver_demo.dart
new file mode 100644
index 00000000..cde1d0a2
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/sliver_demo.dart
@@ -0,0 +1,120 @@
+import 'package:flutter/material.dart';
+import '../model/post.dart';
+
+class SliverDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: CustomScrollView(
+ slivers: [
+ SliverAppBar(
+ // title: Text('NINGHAO'),
+ // pinned: true,
+ floating: true,
+ expandedHeight: 178.0,
+ flexibleSpace: FlexibleSpaceBar(
+ title: Text(
+ 'Ninghao Flutter'.toUpperCase(),
+ style: TextStyle(
+ fontSize: 15.0,
+ letterSpacing: 3.0,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ background: Image.network(
+ 'https://resources.ninghao.net/images/overkill.png',
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ SliverSafeArea(
+ sliver: SliverPadding(
+ padding: EdgeInsets.all(8.0),
+ sliver: SliverGridDemo()
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class SliverListDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return SliverList(
+ delegate: SliverChildBuilderDelegate(
+ (BuildContext context, int index) {
+ return Padding(
+ padding: EdgeInsets.only(bottom: 32.0),
+ child: Material(
+ borderRadius: BorderRadius.circular(12.0),
+ elevation: 14.0,
+ shadowColor: Colors.grey.withOpacity(0.5),
+ child: Stack(
+ children: [
+ AspectRatio(
+ aspectRatio: 16/9,
+ child: Image.network(
+ posts[index].imageUrl,
+ fit: BoxFit.cover,
+ ),
+ ),
+ Positioned(
+ top: 32.0,
+ left: 32.0,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ posts[index].title,
+ style: TextStyle(
+ fontSize: 20.0,
+ color: Colors.white
+ ),
+ ),
+ Text(
+ posts[index].author,
+ style: TextStyle(
+ fontSize: 13.0,
+ color: Colors.white
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ },
+ childCount: posts.length,
+ ),
+ );
+ }
+}
+
+class SliverGridDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return SliverGrid(
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 2,
+ crossAxisSpacing: 8.0,
+ mainAxisSpacing: 8.0,
+ childAspectRatio: 1.0,
+ ),
+ delegate: SliverChildBuilderDelegate(
+ (BuildContext context, int index) {
+ return Container(
+ child: Image.network(
+ posts[index].imageUrl,
+ fit: BoxFit.cover,
+ ),
+ );
+ },
+ childCount: posts.length,
+ ),
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/snack_bar_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/snack_bar_demo.dart
new file mode 100644
index 00000000..408b605f
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/snack_bar_demo.dart
@@ -0,0 +1,52 @@
+import 'package:flutter/material.dart';
+
+class SnackBarDemo extends StatefulWidget {
+ @override
+ _SnackBarDemoState createState() => _SnackBarDemoState();
+}
+
+class _SnackBarDemoState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('SnackBarDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SnackBarButton(),
+ ]
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class SnackBarButton extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return FlatButton(
+ child: Text('Open SnackBar'),
+ onPressed: () {
+ Scaffold.of(context).showSnackBar(
+ SnackBar(
+ content: Text('Processing...'),
+ action: SnackBarAction(
+ label: 'OK',
+ onPressed: () {},
+ ),
+ )
+ );
+ },
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/state/state_management_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/state/state_management_demo.dart
new file mode 100644
index 00000000..fd35aaf5
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/state/state_management_demo.dart
@@ -0,0 +1,76 @@
+import 'package:flutter/material.dart';
+import 'package:scoped_model/scoped_model.dart';
+
+class StateManagementDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return ScopedModel(
+ model: CounterModel(),
+ child: Scaffold(
+ appBar: AppBar(
+ title: Text('StateManagementDemo'),
+ elevation: 0.0,
+ ),
+ body: CounterWrapper(),
+ floatingActionButton: ScopedModelDescendant(
+ rebuildOnChange: false,
+ builder: (context, _, model) => FloatingActionButton(
+ child: Icon(Icons.add),
+ onPressed: model.increaseCount,
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class CounterWrapper extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Center(
+ child: Counter(),
+ );
+ }
+}
+
+class Counter extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return ScopedModelDescendant(
+ builder: (context, _, model) => ActionChip(
+ label: Text('${model.count}'),
+ onPressed: model.increaseCount,
+ ),
+ );
+ }
+}
+
+class CounterProvider extends InheritedWidget {
+ final int count;
+ final VoidCallback increaseCount;
+ final Widget child;
+
+ CounterProvider({
+ this.count,
+ this.increaseCount,
+ this.child,
+ }) : super(child: child);
+
+ static CounterProvider of(BuildContext context) =>
+ context.inheritFromWidgetOfExactType(CounterProvider);
+
+ @override
+ bool updateShouldNotify(InheritedWidget oldWidget) {
+ return true;
+ }
+}
+
+class CounterModel extends Model {
+ int _count = 0;
+ int get count => _count;
+
+ void increaseCount() {
+ _count += 1;
+ notifyListeners();
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/stepper_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/stepper_demo.dart
new file mode 100644
index 00000000..0593211b
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/stepper_demo.dart
@@ -0,0 +1,71 @@
+import 'package:flutter/material.dart';
+
+class StepperDemo extends StatefulWidget {
+ @override
+ _StepperDemoState createState() => _StepperDemoState();
+}
+
+class _StepperDemoState extends State {
+ int _currentStep = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('StepperDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Theme(
+ data: Theme.of(context).copyWith(
+ primaryColor: Colors.black,
+ ),
+ child: Stepper(
+ currentStep: _currentStep,
+ onStepTapped: (int value) {
+ setState(() {
+ _currentStep = value;
+ });
+ },
+ onStepContinue: () {
+ setState(() {
+ _currentStep < 2 ? _currentStep += 1 : _currentStep = 0;
+ });
+ },
+ onStepCancel: () {
+ setState(() {
+ _currentStep > 0 ? _currentStep -= 1 : _currentStep = 0;
+ });
+ },
+ steps: [
+ Step(
+ title: Text('Login'),
+ subtitle: Text('Login first'),
+ content: Text('Magna exercitation duis non sint eu nostrud.'),
+ isActive: _currentStep == 0,
+ ),
+ Step(
+ title: Text('Choose Plan'),
+ subtitle: Text('Choose you plan.'),
+ content: Text('Magna exercitation duis non sint eu nostrud.'),
+ isActive: _currentStep == 1,
+ ),
+ Step(
+ title: Text('Confirm payment'),
+ subtitle: Text('Confirm your payment method.'),
+ content: Text('Magna exercitation duis non sint eu nostrud.'),
+ isActive: _currentStep == 2,
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/stream/stream_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/stream/stream_demo.dart
new file mode 100644
index 00000000..e4aa66e7
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/stream/stream_demo.dart
@@ -0,0 +1,142 @@
+import 'dart:async';
+
+import 'package:flutter/material.dart';
+
+class StreamDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('StreamDemo'),
+ elevation: 0.0,
+ ),
+ body: StreamDemoHome(),
+ );
+ }
+}
+
+class StreamDemoHome extends StatefulWidget {
+ @override
+ _StreamDemoHomeState createState() => _StreamDemoHomeState();
+}
+
+class _StreamDemoHomeState extends State {
+ StreamSubscription _streamDemoSubscription;
+ StreamController _streamDemo;
+ StreamSink _sinkDemo;
+ String _data = '...';
+
+ @override
+ void dispose() {
+ _streamDemo.close();
+ super.dispose();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+
+ print('Create a stream.');
+ // Stream _streamDemo = Stream.fromFuture(fetchData());
+ _streamDemo = StreamController.broadcast();
+ _sinkDemo = _streamDemo.sink;
+
+ print('Start listening on a stream.');
+ _streamDemoSubscription =
+ _streamDemo.stream.listen(onData, onError: onError, onDone: onDone);
+
+ _streamDemo.stream.listen(onDataTwo, onError: onError, onDone: onDone);
+
+ print('Initialize completed.');
+ }
+
+ void onDone() {
+ print('Done!');
+ }
+
+ void onError(error) {
+ print('Error: $error');
+ }
+
+ void onData(String data) {
+ setState(() {
+ _data = data;
+ });
+ print('$data');
+ }
+
+ void onDataTwo(String data) {
+ print('onDataTwo: $data');
+ }
+
+ void _pauseStream() {
+ print('Pause subscription');
+ _streamDemoSubscription.pause();
+ }
+
+ void _resumeStream() {
+ print('Resume subscription');
+ _streamDemoSubscription.resume();
+ }
+
+ void _cancelStream() {
+ print('Cancel subscription');
+ _streamDemoSubscription.cancel();
+ }
+
+ void _addDataToStream() async {
+ print('Add data to stream.');
+
+ String data = await fetchData();
+ // _streamDemo.add(data);
+ _sinkDemo.add(data);
+ }
+
+ Future fetchData() async {
+ await Future.delayed(Duration(seconds: 5));
+ // throw 'Something happened';
+ return 'hello ~';
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ child: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ // Text(_data),
+ StreamBuilder(
+ stream: _streamDemo.stream,
+ initialData: '...',
+ builder: (context, snapshot) {
+ return Text('${snapshot.data}');
+ },
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ FlatButton(
+ child: Text('Add'),
+ onPressed: _addDataToStream,
+ ),
+ FlatButton(
+ child: Text('Pause'),
+ onPressed: _pauseStream,
+ ),
+ FlatButton(
+ child: Text('Resume'),
+ onPressed: _resumeStream,
+ ),
+ FlatButton(
+ child: Text('Cancel'),
+ onPressed: _cancelStream,
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/switch_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/switch_demo.dart
new file mode 100644
index 00000000..40408f9f
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/switch_demo.dart
@@ -0,0 +1,54 @@
+import 'package:flutter/material.dart';
+
+class SwitchDemo extends StatefulWidget {
+ @override
+ _SwitchDemoState createState() => _SwitchDemoState();
+}
+
+class _SwitchDemoState extends State {
+ bool _switchItemA = false;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('SwitchDemo'),
+ elevation: 0.0,
+ ),
+ body: Container(
+ padding: EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SwitchListTile(
+ value: _switchItemA,
+ onChanged: (value) {
+ setState(() {
+ _switchItemA = value;
+ });
+ },
+ title: Text('Switch Item A'),
+ subtitle: Text('Description'),
+ secondary: Icon(_switchItemA ? Icons.visibility : Icons.visibility_off),
+ selected: _switchItemA,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ // Text(_switchItemA ? '😁' : '😐', style: TextStyle(fontSize: 32.0),),
+ // Switch(
+ // value: _switchItemA,
+ // onChanged: (value) {
+ // setState(() {
+ // _switchItemA = value;
+ // });
+ // },
+ // ),
+ ],
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/test/test_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/test/test_demo.dart
new file mode 100644
index 00000000..fa0921f6
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/test/test_demo.dart
@@ -0,0 +1,49 @@
+import 'package:flutter/material.dart';
+
+class TestDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('TestDemo'),
+ elevation: 0.0,
+ ),
+ body: TestDemoHome(),
+ );
+ }
+}
+
+class TestDemoHome extends StatefulWidget {
+ @override
+ _TestDemoHomeState createState() => _TestDemoHomeState();
+}
+
+class _TestDemoHomeState extends State {
+ int count = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ children: [
+ Chip(
+ label: Text('hello'),
+ ),
+ ActionChip(
+ key: Key('actionChip'),
+ label: Text('$count', key: Key('actionChipLabelText')),
+ onPressed: () {
+ setState(() {
+ count++;
+ });
+ },
+ )
+ ],
+ );
+ }
+}
+
+class NinghaoTestDemo {
+ static greet(String name) {
+ return 'hello $name ~~';
+ }
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/lib/demo/view_demo.dart b/FlutterHelper/ninghao_flutter-master/lib/demo/view_demo.dart
new file mode 100644
index 00000000..27f2d794
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/demo/view_demo.dart
@@ -0,0 +1,154 @@
+import 'package:flutter/material.dart';
+import '../model/post.dart';
+
+class ViewDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return GridViewBuilderDemo();
+ }
+}
+
+class GridViewBuilderDemo extends StatelessWidget {
+ Widget _gridItemBuilder(BuildContext context, int index) {
+ return Container(
+ child: Image.network(
+ posts[index].imageUrl,
+ fit: BoxFit.cover
+ ),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return GridView.builder(
+ padding: EdgeInsets.all(8.0),
+ itemCount: posts.length,
+ itemBuilder: _gridItemBuilder,
+ gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
+ // crossAxisCount: 3,
+ maxCrossAxisExtent: 150.0,
+ crossAxisSpacing: 8.0,
+ mainAxisSpacing: 8.0,
+ ),
+ );
+ }
+}
+
+class GridViewExtentDemo extends StatelessWidget {
+ List _buildTiles(int length) {
+ return List.generate(length, (int index) {
+ return Container(
+ color: Colors.grey[300],
+ alignment: Alignment(0.0, 0.0),
+ child: Text('Item $index',
+ style: TextStyle(fontSize: 18.0, color: Colors.grey)),
+ );
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return GridView.extent(
+ maxCrossAxisExtent: 150.0,
+ crossAxisSpacing: 16.0,
+ mainAxisSpacing: 16.0,
+ // scrollDirection: Axis.horizontal,
+ children: _buildTiles(100),
+ );
+ }
+}
+
+class GridViewCountDemo extends StatelessWidget {
+ List _buildTiles(int length) {
+ return List.generate(length, (int index) {
+ return Container(
+ color: Colors.grey[300],
+ alignment: Alignment(0.0, 0.0),
+ child: Text('Item $index',
+ style: TextStyle(fontSize: 18.0, color: Colors.grey)),
+ );
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return GridView.count(
+ crossAxisCount: 3,
+ crossAxisSpacing: 16.0,
+ mainAxisSpacing: 16.0,
+ scrollDirection: Axis.horizontal,
+ children: _buildTiles(100),
+ );
+ }
+}
+
+class PageViewBuilderDemo extends StatelessWidget {
+ Widget _pageItemBuilder(BuildContext context, int index) {
+ return Stack(
+ children: [
+ SizedBox.expand(
+ child: Image.network(posts[index].imageUrl, fit: BoxFit.cover),
+ ),
+ Positioned(
+ bottom: 8.0,
+ left: 8.0,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(posts[index].title,
+ style: TextStyle(fontWeight: FontWeight.bold)),
+ Text(posts[index].author),
+ ],
+ ),
+ ),
+ ],
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ // TODO: implement build
+ return PageView.builder(
+ itemCount: posts.length,
+ itemBuilder: _pageItemBuilder,
+ );
+ }
+}
+
+class PageViewDemo extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ // TODO: implement build
+ return PageView(
+ // pageSnapping: false,
+ // reverse: true,
+ scrollDirection: Axis.vertical,
+ onPageChanged: (currentPage) => debugPrint('Page: $currentPage'),
+ controller: PageController(
+ initialPage: 1,
+ keepPage: false,
+ viewportFraction: 0.85,
+ ),
+ children: [
+ Container(
+ color: Colors.brown[900],
+ alignment: Alignment(0.0, 0.0),
+ child: Text('ONE',
+ style: TextStyle(fontSize: 32.0, color: Colors.white)),
+ ),
+ Container(
+ color: Colors.grey[900],
+ alignment: Alignment(0.0, 0.0),
+ child: Text('TWO',
+ style: TextStyle(fontSize: 32.0, color: Colors.white)),
+ ),
+ Container(
+ color: Colors.blueGrey[900],
+ alignment: Alignment(0.0, 0.0),
+ child: Text('THREE',
+ style: TextStyle(fontSize: 32.0, color: Colors.white)),
+ ),
+ ],
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/main.dart b/FlutterHelper/ninghao_flutter-master/lib/main.dart
new file mode 100644
index 00000000..be738d5b
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/main.dart
@@ -0,0 +1,116 @@
+import 'package:flutter/material.dart';
+import 'package:ninghao_flutter/demo/animation/animation_demo.dart';
+import 'package:ninghao_flutter/demo/bloc/bloc_demo.dart';
+import 'package:ninghao_flutter/demo/http/http_demo.dart';
+import 'package:ninghao_flutter/demo/i18n/i18n_demo.dart';
+import 'package:ninghao_flutter/demo/rxdart/rxdart_demo.dart';
+import 'package:ninghao_flutter/demo/state/state_management_demo.dart';
+import 'package:ninghao_flutter/demo/stream/stream_demo.dart';
+import 'package:ninghao_flutter/demo/test/test_demo.dart';
+import './demo/drawer_demo.dart';
+import './demo/bottom_navigation_bar_demo.dart';
+import './demo/listview_demo.dart';
+import './demo/basic_demo.dart';
+import './demo/layout_demo.dart';
+import './demo/view_demo.dart';
+import './demo/sliver_demo.dart';
+import './demo/navigator_demo.dart';
+import './demo/form_demo.dart';
+import './demo/material_components.dart';
+import 'package:flutter_localizations/flutter_localizations.dart';
+// import 'package:ninghao_flutter/demo/i18n/map/ninghao_demo_localizations.dart';
+import 'package:ninghao_flutter/demo/i18n/intl/ninghao_demo_localizations.dart';
+
+void main() => runApp(App());
+
+class App extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ locale: Locale('en', 'US'),
+ // locale: Locale('zh', 'CN'),
+ // localeResolutionCallback: (Locale locale, Iterable supportedLocales) {
+ // return Locale('en', 'US');
+ // },
+ localizationsDelegates: [
+ NinghaoDemoLocalizationsDelegate(),
+ GlobalMaterialLocalizations.delegate,
+ GlobalWidgetsLocalizations.delegate,
+ ],
+ supportedLocales: [
+ Locale('en', 'US'),
+ Locale('zh', 'CN'),
+ ],
+ debugShowCheckedModeBanner: false,
+ // home: NavigatorDemo(),
+ initialRoute: '/test',
+ routes: {
+ '/': (context) => Home(),
+ '/about': (context) => Page(title: 'About'),
+ '/form': (context) => FormDemo(),
+ '/mdc': (context) => MaterialComponents(),
+ '/state-management': (context) => StateManagementDemo(),
+ '/stream': (context) => StreamDemo(),
+ '/rxdart': (context) => RxDartDemo(),
+ '/bloc': (context) => BlocDemo(),
+ '/http': (context) => HttpDemo(),
+ '/animation': (context) => AnimationDemo(),
+ '/i18n': (context) => I18nDemo(),
+ '/test': (context) => TestDemo(),
+ },
+ theme: ThemeData(
+ primarySwatch: Colors.yellow,
+ highlightColor: Color.fromRGBO(255, 255, 255, 0.5),
+ splashColor: Colors.white70,
+ accentColor: Color.fromRGBO(3, 54, 255, 1.0),
+ )
+ );
+ }
+}
+
+class Home extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return DefaultTabController(
+ length: 4,
+ child: Scaffold(
+ backgroundColor: Colors.grey[100],
+ appBar: AppBar(
+ title: Text('NINGHAO'),
+ actions: [
+ IconButton(
+ icon: Icon(Icons.search),
+ tooltip: 'Search',
+ onPressed: () => debugPrint('Search button is pressed.'),
+ )
+ ],
+ elevation: 0.0,
+ bottom: TabBar(
+ unselectedLabelColor: Colors.black38,
+ indicatorColor: Colors.black54,
+ indicatorSize: TabBarIndicatorSize.label,
+ indicatorWeight: 1.0,
+ tabs: [
+ Tab(icon: Icon(Icons.local_florist)),
+ Tab(icon: Icon(Icons.change_history)),
+ Tab(icon: Icon(Icons.directions_bike)),
+ Tab(icon: Icon(Icons.view_quilt)),
+ ],
+ ),
+ ),
+ body: TabBarView(
+ children: [
+ ListViewDemo(),
+ // Icon(Icons.change_history, size: 128.0, color: Colors.black12),
+ BasicDemo(),
+ // Icon(Icons.directions_bike, size: 128.0, color: Colors.black12),
+ LayoutDemo(),
+ SliverDemo(),
+ ],
+ ),
+ drawer: DrawerDemo(),
+ bottomNavigationBar: BottomNavigationBarDemo(),
+ ),
+ );
+ }
+}
diff --git a/FlutterHelper/ninghao_flutter-master/lib/model/post.dart b/FlutterHelper/ninghao_flutter-master/lib/model/post.dart
new file mode 100644
index 00000000..2187663b
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/lib/model/post.dart
@@ -0,0 +1,108 @@
+class Post {
+ Post({
+ this.title,
+ this.author,
+ this.imageUrl,
+ this.description,
+ });
+
+ final String title;
+ final String author;
+ final String imageUrl;
+ final String description;
+
+ bool selected = false;
+}
+
+final List posts = [
+ Post(
+ title: 'Candy Shop',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/candy-shop.jpg',
+ ),
+ Post(
+ title: 'Childhood in a picture',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/childhood-in-a-picture.jpg',
+ ),
+ Post(
+ title: 'Contained',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/contained.jpg',
+ ),
+ Post(
+ title: 'Dragon',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/dragon.jpg',
+ ),
+ Post(
+ title: 'Free Hugs',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/free_hugs.jpg',
+ ),
+ Post(
+ title: 'Gravity Falls',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/gravity-falls.png',
+ ),
+ Post(
+ title: 'Icecream Truck',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/icecreamtruck.png',
+ ),
+ Post(
+ title: 'keyclack',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/keyclack.jpg',
+ ),
+ Post(
+ title: 'Overkill',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/overkill.png',
+ ),
+ Post(
+ title: 'Say Hello to Barry',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/say-hello-to-barry.jpg',
+ ),
+ Post(
+ title: 'Space Skull',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/space-skull.jpg',
+ ),
+ Post(
+ title: 'The Old Fashioned',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/the-old-fashioned.png',
+ ),
+ Post(
+ title: 'Tornado',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/tornado.jpg',
+ ),
+ Post(
+ title: 'Undo',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/undo.jpg',
+ ),
+ Post(
+ title: 'White Dragon',
+ author: 'Mohamed Chahin',
+ description: 'Esse ut nulla velit reprehenderit veniam sint nostrud nulla exercitation ipsum. Officia deserunt aliquip aliquip excepteur eiusmod dolor. Elit amet ipsum labore sint occaecat dolore tempor officia irure voluptate ad. Veniam laboris deserunt aute excepteur sit deserunt dolor esse dolor velit sint nulla anim ut. Reprehenderit voluptate adipisicing culpa magna ea nulla ullamco consectetur. Cupidatat adipisicing consequat adipisicing sit consectetur dolor occaecat.',
+ imageUrl: 'https://resources.ninghao.org/images/white-dragon.jpg',
+ )
+];
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/pubspec.lock b/FlutterHelper/ninghao_flutter-master/pubspec.lock
new file mode 100644
index 00000000..46e7a78f
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/pubspec.lock
@@ -0,0 +1,247 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ archive:
+ dependency: transitive
+ description:
+ name: archive
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "3.1.2"
+ async:
+ dependency: transitive
+ description:
+ name: async
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.6.1"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.1.0"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.1.0"
+ charcode:
+ dependency: transitive
+ description:
+ name: charcode
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.2.0"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.1.0"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.15.0"
+ crypto:
+ dependency: transitive
+ description:
+ name: crypto
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "3.0.1"
+ cupertino_icons:
+ dependency: "direct main"
+ description:
+ name: cupertino_icons
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.1.2"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.2.0"
+ file:
+ dependency: transitive
+ description:
+ name: file
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "6.1.0"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_driver:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_test:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ fuchsia_remote_debug_protocol:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ http:
+ dependency: "direct main"
+ description:
+ name: http
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.12.0"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "3.1.3"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.12.10"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.3.0"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.8.0"
+ platform:
+ dependency: transitive
+ description:
+ name: platform
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "3.0.0"
+ process:
+ dependency: transitive
+ description:
+ name: process
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "4.2.1"
+ rxdart:
+ dependency: "direct main"
+ description:
+ name: rxdart
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.18.1"
+ scoped_model:
+ dependency: "direct main"
+ description:
+ name: scoped_model
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.3.0"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.99"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.8.1"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.10.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.1.0"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.1.0"
+ sync_http:
+ dependency: transitive
+ description:
+ name: sync_http
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.3.0"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.2.0"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.3.0"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.3.0"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "2.1.0"
+ vm_service:
+ dependency: transitive
+ description:
+ name: vm_service
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "6.2.0"
+ webdriver:
+ dependency: transitive
+ description:
+ name: webdriver
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "3.0.0"
+sdks:
+ dart: ">=2.12.0 <3.0.0"
diff --git a/FlutterHelper/ninghao_flutter-master/pubspec.yaml b/FlutterHelper/ninghao_flutter-master/pubspec.yaml
new file mode 100644
index 00000000..1c10140d
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/pubspec.yaml
@@ -0,0 +1,75 @@
+name: ninghao_flutter
+description: A new Flutter project.
+
+# The following defines the version and build number for your application.
+# A version number is three numbers separated by dots, like 1.2.43
+# followed by an optional build number separated by a +.
+# Both the version and the builder number may be overridden in flutter
+# build by specifying --build-name and --build-number, respectively.
+# Read more about versioning at semver.org.
+version: 1.0.0+1
+
+dependencies:
+ flutter:
+ sdk: flutter
+ scoped_model: ^0.3.0
+ rxdart: ^0.18.1
+ http: ^0.12.0
+# flutter_localizations:
+# sdk: flutter
+# intl: ^0.17.0
+
+ # The following adds the Cupertino Icons font to your application.
+ # Use with the CupertinoIcons class for iOS style icons.
+ cupertino_icons: ^0.1.2
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+ flutter_driver:
+ sdk: flutter
+# intl_translation: ^0.17.2
+
+environment:
+ sdk: '>=2.10.0 <3.0.0'
+# For information on the generic Dart part of this file, see the
+# following page: https://www.dartlang.org/tools/pub/pubspec
+
+# The following section is specific to Flutter.
+flutter:
+
+ # The following line ensures that the Material Icons font is
+ # included with your application, so that you can use the icons in
+ # the material Icons class.
+ uses-material-design: true
+
+ # To add assets to your application, add an assets section, like this:
+ # assets:
+ # - images/a_dot_burr.jpeg
+ # - images/a_dot_ham.jpeg
+
+ # An image asset can refer to one or more resolution-specific "variants", see
+ # https://flutter.io/assets-and-images/#resolution-aware.
+
+ # For details regarding adding assets from package dependencies, see
+ # https://flutter.io/assets-and-images/#from-packages
+
+ # To add custom fonts to your application, add a fonts section here,
+ # in this "flutter" section. Each entry in this list should have a
+ # "family" key with the font family name, and a "fonts" key with a
+ # list giving the asset and other descriptors for the font. For
+ # example:
+ # fonts:
+ # - family: Schyler
+ # fonts:
+ # - asset: fonts/Schyler-Regular.ttf
+ # - asset: fonts/Schyler-Italic.ttf
+ # style: italic
+ # - family: Trajan Pro
+ # fonts:
+ # - asset: fonts/TrajanPro.ttf
+ # - asset: fonts/TrajanPro_Bold.ttf
+ # weight: 700
+ #
+ # For details regarding fonts from package dependencies,
+ # see https://flutter.io/custom-fonts/#from-packages
diff --git a/FlutterHelper/ninghao_flutter-master/test/ninghao_demo_test.dart b/FlutterHelper/ninghao_flutter-master/test/ninghao_demo_test.dart
new file mode 100644
index 00000000..55320349
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/test/ninghao_demo_test.dart
@@ -0,0 +1,35 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:ninghao_flutter/demo/test/test_demo.dart';
+
+void main() {
+ test('should return hello + something.', () {
+ var string = NinghaoTestDemo.greet('ninghao');
+ expect(string, 'hello ninghao ~~');
+ });
+
+ testWidgets('widget testing demo', (WidgetTester tester) async {
+ await tester.pumpWidget(
+ MaterialApp(
+ home: TestDemo()
+ )
+ );
+
+ final labelText = find.text('hello');
+
+ // expect(labelText, findsNothing);
+ // expect(labelText, findsOneWidget);
+ expect(labelText, findsNWidgets(1));
+
+ final actionChipLabelText = find.text('0');
+ expect(actionChipLabelText, findsOneWidget);
+
+ final actionChip = find.byType(ActionChip);
+ await tester.tap(actionChip);
+ await tester.pump();
+
+ final actionChipLabelTextAfterTap = find.text('1');
+ expect(actionChipLabelTextAfterTap, findsOneWidget);
+ expect(actionChipLabelText, findsNothing);
+ });
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/test_driver/app.dart b/FlutterHelper/ninghao_flutter-master/test_driver/app.dart
new file mode 100644
index 00000000..99aa8a03
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/test_driver/app.dart
@@ -0,0 +1,8 @@
+import 'package:flutter_driver/driver_extension.dart';
+import 'package:ninghao_flutter/main.dart' as app;
+
+void main() {
+ enableFlutterDriverExtension();
+
+ app.main();
+}
\ No newline at end of file
diff --git a/FlutterHelper/ninghao_flutter-master/test_driver/app_test.dart b/FlutterHelper/ninghao_flutter-master/test_driver/app_test.dart
new file mode 100644
index 00000000..f9877237
--- /dev/null
+++ b/FlutterHelper/ninghao_flutter-master/test_driver/app_test.dart
@@ -0,0 +1,31 @@
+import 'package:flutter_driver/flutter_driver.dart';
+import 'package:test/test.dart';
+
+void main() {
+ group('App', () {
+ FlutterDriver driver;
+
+ final actionChip = find.byValueKey('actionChip');
+ final actionChipLabelText = find.byValueKey('actionChipLabelText');
+
+ setUpAll(() async {
+ driver = await FlutterDriver.connect();
+ });
+
+ tearDownAll(() async {
+ if (driver != null) {
+ driver.close();
+ }
+ });
+
+ test('starts at 0', () async {
+ expect(await driver.getText(actionChipLabelText), '0');
+ });
+
+ test('increments the counter', () async {
+ await driver.tap(actionChip);
+
+ expect(await driver.getText(actionChipLabelText), '1');
+ });
+ });
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index b5e2bbce..650dc963 100644
--- a/build.gradle
+++ b/build.gradle
@@ -37,13 +37,14 @@ buildscript {
//google()
//jcenter()
maven { url 'http://repo.duowan.com:8181/nexus/content/groups/public' }
+ maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'//3.6.2
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.8'
-
+ classpath "de.undercouch:gradle-download-task:4.1.2"
classpath 'me.ele:lancet-plugin:1.0.4'
//classpath 'com.imooc.router:router-gradle-plugin:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
diff --git a/buildSrc/build/libs/buildSrc.jar b/buildSrc/build/libs/buildSrc.jar
index 051e976d..e4bfea7d 100644
Binary files a/buildSrc/build/libs/buildSrc.jar and b/buildSrc/build/libs/buildSrc.jar differ
diff --git a/buildSrc/src/main/groovy/com/immoc/router/gradle/RouterPlugin.groovy b/buildSrc/src/main/groovy/com/immoc/router/gradle/RouterPlugin.groovy
index 7b5f667c..92524135 100644
--- a/buildSrc/src/main/groovy/com/immoc/router/gradle/RouterPlugin.groovy
+++ b/buildSrc/src/main/groovy/com/immoc/router/gradle/RouterPlugin.groovy
@@ -2,12 +2,38 @@ package com.immoc.router.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
+import groovy.json.JsonSlurper
class RouterPlugin implements Plugin {
// 实现apply方法,注入插件的逻辑
@Override
void apply(Project project) {
+ // 1. 自动的帮助用户传递路径参数到注解处理器中
+ // 2. 实现旧的构建产物的自动清理
+ // 3。在javac任务后汇总生成文档
+
+ //kapt {
+ // arguments {
+ // arg("root_project_dir", rootProject.projectDir.absolutePath)
+ // }
+ //}
+ // 1. 自动的帮助用户传递路径参数到注解处理器中
+ if (project.extensions.findByName("kapt") != null) {
+ project.extensions.findByName("kapt").arguments {
+ arg("root_project_dir", project.rootProject.projectDir.absolutePath)
+ }
+ }
+ // 2. 实现旧的构建产物的自动清理
+ project.clean.doFirst {
+ // 删除上一次生成的router_mapping目录
+ File routerMappingDir = new File(project.rootProject.projectDir.absolutePath, "router_mapping")
+ if (routerMappingDir.exists()) {
+ routerMappingDir.deleteDir()
+ }
+
+ }
+
println("I am from RouterPlugin, apply from ${project.name}")
project.getExtensions().create("router", RouterExtension) //使用Extension
@@ -15,6 +41,50 @@ class RouterPlugin implements Plugin {
// 拿到配置的router
RouterExtension extension = project["router"]
println("用户设置的WIKI路径为:${extension.wikiDir}")
+
+ // 3。在javac任务后汇总生成文档
+ // compileDebugJavaWithJavac
+ project.tasks.findAll { task ->
+ task.name.startsWith("compile") && task.name.endsWith("JavaWithJavac")
+ }.each { task ->
+ task.doLast {
+ File routerMappingDir = new File(project.rootProject.projectDir, "router_mapping")
+ if (!routerMappingDir.exists()) {
+ return
+ }
+ // 所有子文件
+ File[] allChildFiles = routerMappingDir.listFiles()
+ if (allChildFiles.length < 1) {
+ return
+ }
+ StringBuilder markdownBuilder = new StringBuilder()
+ markdownBuilder.append("# 页面文档\n\n")
+ allChildFiles.each { child ->
+ if (child.name.endsWith(".json")) {
+ JsonSlurper jsonSlurper = new JsonSlurper()
+ def content = jsonSlurper.parse(child)
+ content.each { innerContent ->
+ def url = innerContent['url']
+ def description = innerContent['description']
+ def realPath = innerContent['realPath']
+ markdownBuilder.append("## $description \n")
+ markdownBuilder.append("- url: $url \n")
+ markdownBuilder.append("- realPath: $realPath \n")
+ }
+
+ }
+ }
+ File wikiFileDir = new File(extension.wikiDir)
+ if (!wikiFileDir.exists()) {
+ wikiFileDir.mkdir()
+ }
+ File wikiFile = new File(wikiFileDir, "页面文档")
+ if (wikiFile.exists()) {
+ wikiFile.delete()
+ }
+ wikiFile.write(markdownBuilder.toString())
+ }
+ }
}
}
}
\ No newline at end of file
diff --git a/cpp/demo/cmake-build-debug/CMakeFiles/clion-log.txt b/cpp/demo/cmake-build-debug/CMakeFiles/clion-log.txt
index 951082ac..62864c2d 100644
--- a/cpp/demo/cmake-build-debug/CMakeFiles/clion-log.txt
+++ b/cpp/demo/cmake-build-debug/CMakeFiles/clion-log.txt
@@ -1,4 +1,15 @@
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/flannery/Desktop/AndroidHelper/cpp/demo
+CMake Warning at /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.17/Modules/Platform/Darwin-Initialize.cmake:286 (message):
+ Ignoring CMAKE_OSX_SYSROOT value:
+
+ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
+
+ because the directory does not exist.
+Call Stack (most recent call first):
+ /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.17/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
+ CMakeLists.txt:2 (project)
+
+
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/flannery/Desktop/AndroidHelper/cpp/demo/cmake-build-debug
diff --git a/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/flags.make b/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/flags.make
index e4d0c69d..1ec6a81b 100644
--- a/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/flags.make
+++ b/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/flags.make
@@ -2,7 +2,7 @@
# Generated by "Unix Makefiles" Generator, CMake Version 3.17
# compile CXX with /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-CXX_FLAGS = -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -std=gnu++14
+CXX_FLAGS = -g -std=gnu++14
CXX_DEFINES =
diff --git a/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/link.txt b/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/link.txt
index b7878813..0e6e8ef6 100644
--- a/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/link.txt
+++ b/cpp/demo/cmake-build-debug/CMakeFiles/demo.dir/link.txt
@@ -1 +1 @@
-/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/demo.dir/main.cpp.o CMakeFiles/demo.dir/limits.cpp.o CMakeFiles/demo.dir/hexoct2.cpp.o -o demo
+/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/demo.dir/main.cpp.o CMakeFiles/demo.dir/limits.cpp.o CMakeFiles/demo.dir/hexoct2.cpp.o -o demo
diff --git a/cpp/demo/cmake-build-debug/Testing/Temporary/LastTest.log b/cpp/demo/cmake-build-debug/Testing/Temporary/LastTest.log
index a913f18c..365e5e9d 100644
--- a/cpp/demo/cmake-build-debug/Testing/Temporary/LastTest.log
+++ b/cpp/demo/cmake-build-debug/Testing/Temporary/LastTest.log
@@ -1,3 +1,3 @@
-Start testing: Jul 09 13:58 CST
+Start testing: Jul 14 14:45 CST
----------------------------------------------------------
-End testing: Jul 09 13:58 CST
+End testing: Jul 14 14:45 CST
diff --git a/cpp/xcode/Test/Test.xcodeproj/project.pbxproj b/cpp/xcode/Test/Test.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..403b01e0
--- /dev/null
+++ b/cpp/xcode/Test/Test.xcodeproj/project.pbxproj
@@ -0,0 +1,279 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 50;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ BEC96F8A269FCCDA008F460F /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEC96F89269FCCDA008F460F /* main.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ BEC96F84269FCCD9008F460F /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ BEC96F86269FCCD9008F460F /* Test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Test; sourceTree = BUILT_PRODUCTS_DIR; };
+ BEC96F89269FCCDA008F460F /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ BEC96F83269FCCD9008F460F /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ BEC96F7D269FCCD9008F460F = {
+ isa = PBXGroup;
+ children = (
+ BEC96F88269FCCD9008F460F /* Test */,
+ BEC96F87269FCCD9008F460F /* Products */,
+ );
+ sourceTree = "";
+ };
+ BEC96F87269FCCD9008F460F /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ BEC96F86269FCCD9008F460F /* Test */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ BEC96F88269FCCD9008F460F /* Test */ = {
+ isa = PBXGroup;
+ children = (
+ BEC96F89269FCCDA008F460F /* main.cpp */,
+ );
+ path = Test;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ BEC96F85269FCCD9008F460F /* Test */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BEC96F8D269FCCDA008F460F /* Build configuration list for PBXNativeTarget "Test" */;
+ buildPhases = (
+ BEC96F82269FCCD9008F460F /* Sources */,
+ BEC96F83269FCCD9008F460F /* Frameworks */,
+ BEC96F84269FCCD9008F460F /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Test;
+ productName = Test;
+ productReference = BEC96F86269FCCD9008F460F /* Test */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ BEC96F7E269FCCD9008F460F /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1210;
+ TargetAttributes = {
+ BEC96F85269FCCD9008F460F = {
+ CreatedOnToolsVersion = 12.1;
+ };
+ };
+ };
+ buildConfigurationList = BEC96F81269FCCD9008F460F /* Build configuration list for PBXProject "Test" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = BEC96F7D269FCCD9008F460F;
+ productRefGroup = BEC96F87269FCCD9008F460F /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ BEC96F85269FCCD9008F460F /* Test */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ BEC96F82269FCCD9008F460F /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BEC96F8A269FCCDA008F460F /* main.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ BEC96F8B269FCCDA008F460F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ BEC96F8C269FCCDA008F460F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ BEC96F8E269FCCDA008F460F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ BEC96F8F269FCCDA008F460F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ BEC96F81269FCCD9008F460F /* Build configuration list for PBXProject "Test" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BEC96F8B269FCCDA008F460F /* Debug */,
+ BEC96F8C269FCCDA008F460F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BEC96F8D269FCCDA008F460F /* Build configuration list for PBXNativeTarget "Test" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BEC96F8E269FCCDA008F460F /* Debug */,
+ BEC96F8F269FCCDA008F460F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = BEC96F7E269FCCD9008F460F /* Project object */;
+}
diff --git a/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..919434a6
--- /dev/null
+++ b/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/xcuserdata/flannery.xcuserdatad/UserInterfaceState.xcuserstate b/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/xcuserdata/flannery.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 00000000..f19f5c70
Binary files /dev/null and b/cpp/xcode/Test/Test.xcodeproj/project.xcworkspace/xcuserdata/flannery.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/cpp/xcode/Test/Test.xcodeproj/xcuserdata/flannery.xcuserdatad/xcschemes/xcschememanagement.plist b/cpp/xcode/Test/Test.xcodeproj/xcuserdata/flannery.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 00000000..1c42a578
--- /dev/null
+++ b/cpp/xcode/Test/Test.xcodeproj/xcuserdata/flannery.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,14 @@
+
+
+
+
+ SchemeUserState
+
+ Test.xcscheme_^#shared#^_
+
+ orderHint
+ 0
+
+
+
+
diff --git a/cpp/xcode/Test/Test/main.cpp b/cpp/xcode/Test/Test/main.cpp
new file mode 100644
index 00000000..56958b5d
--- /dev/null
+++ b/cpp/xcode/Test/Test/main.cpp
@@ -0,0 +1,14 @@
+//
+// main.cpp
+// Test
+//
+// Created by 赵健 on 2021/7/15.
+//
+
+#include
+
+int main(int argc, const char * argv[]) {
+ // insert code here...
+ std::cout << "Hello, World!\n";
+ return 0;
+}
diff --git a/flutter_helper/.gitignore b/flutter_helper/.gitignore
new file mode 100644
index 00000000..9d532b18
--- /dev/null
+++ b/flutter_helper/.gitignore
@@ -0,0 +1,41 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
diff --git a/flutter_helper/.metadata b/flutter_helper/.metadata
new file mode 100644
index 00000000..9432b087
--- /dev/null
+++ b/flutter_helper/.metadata
@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: f30b7f4db93ee747cd727df747941a28ead25ff5
+ channel: stable
+
+project_type: app
diff --git a/flutter_helper/README.md b/flutter_helper/README.md
new file mode 100644
index 00000000..784d34d3
--- /dev/null
+++ b/flutter_helper/README.md
@@ -0,0 +1,16 @@
+# flutter_helper
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
+
+For help getting started with Flutter, view our
+[online documentation](https://flutter.dev/docs), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/flutter_helper/android/.gitignore b/flutter_helper/android/.gitignore
new file mode 100644
index 00000000..0a741cb4
--- /dev/null
+++ b/flutter_helper/android/.gitignore
@@ -0,0 +1,11 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
diff --git a/flutter_helper/android/app/build.gradle b/flutter_helper/android/app/build.gradle
new file mode 100644
index 00000000..265f3279
--- /dev/null
+++ b/flutter_helper/android/app/build.gradle
@@ -0,0 +1,63 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion 29
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ lintOptions {
+ disable 'InvalidPackage'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.flutter_helper"
+ minSdkVersion 16
+ targetSdkVersion 29
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}
diff --git a/flutter_helper/android/app/src/debug/AndroidManifest.xml b/flutter_helper/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 00000000..6e9515b9
--- /dev/null
+++ b/flutter_helper/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/flutter_helper/android/app/src/main/AndroidManifest.xml b/flutter_helper/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..cafa5191
--- /dev/null
+++ b/flutter_helper/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_helper/android/app/src/main/kotlin/com/example/flutter_helper/MainActivity.kt b/flutter_helper/android/app/src/main/kotlin/com/example/flutter_helper/MainActivity.kt
new file mode 100644
index 00000000..4cd8d47b
--- /dev/null
+++ b/flutter_helper/android/app/src/main/kotlin/com/example/flutter_helper/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.flutter_helper
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/flutter_helper/android/app/src/main/res/drawable/launch_background.xml b/flutter_helper/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 00000000..304732f8
--- /dev/null
+++ b/flutter_helper/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/flutter_helper/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/flutter_helper/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..db77bb4b
Binary files /dev/null and b/flutter_helper/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/flutter_helper/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/flutter_helper/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..17987b79
Binary files /dev/null and b/flutter_helper/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/flutter_helper/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/flutter_helper/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..09d43914
Binary files /dev/null and b/flutter_helper/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/flutter_helper/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/flutter_helper/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..d5f1c8d3
Binary files /dev/null and b/flutter_helper/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/flutter_helper/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/flutter_helper/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..4d6372ee
Binary files /dev/null and b/flutter_helper/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/flutter_helper/android/app/src/main/res/values/styles.xml b/flutter_helper/android/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..1f83a33f
--- /dev/null
+++ b/flutter_helper/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/flutter_helper/android/app/src/profile/AndroidManifest.xml b/flutter_helper/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 00000000..6e9515b9
--- /dev/null
+++ b/flutter_helper/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/flutter_helper/android/build.gradle b/flutter_helper/android/build.gradle
new file mode 100644
index 00000000..3100ad2d
--- /dev/null
+++ b/flutter_helper/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.3.50'
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.5.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/flutter_helper/android/gradle.properties b/flutter_helper/android/gradle.properties
new file mode 100644
index 00000000..a6738207
--- /dev/null
+++ b/flutter_helper/android/gradle.properties
@@ -0,0 +1,4 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
+android.enableR8=true
diff --git a/flutter_helper/android/gradle/wrapper/gradle-wrapper.properties b/flutter_helper/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..296b146b
--- /dev/null
+++ b/flutter_helper/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
diff --git a/flutter_helper/android/settings.gradle b/flutter_helper/android/settings.gradle
new file mode 100644
index 00000000..44e62bcf
--- /dev/null
+++ b/flutter_helper/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/flutter_helper/images/beatiful_lady.jpeg b/flutter_helper/images/beatiful_lady.jpeg
new file mode 100644
index 00000000..5a3a3b77
Binary files /dev/null and b/flutter_helper/images/beatiful_lady.jpeg differ
diff --git a/flutter_helper/images/bird.png b/flutter_helper/images/bird.png
new file mode 100644
index 00000000..53f9d556
Binary files /dev/null and b/flutter_helper/images/bird.png differ
diff --git a/flutter_helper/images/bossapp2x.png b/flutter_helper/images/bossapp2x.png
new file mode 100644
index 00000000..d316f538
Binary files /dev/null and b/flutter_helper/images/bossapp2x.png differ
diff --git a/flutter_helper/images/ic_main_tab_company_nor.png b/flutter_helper/images/ic_main_tab_company_nor.png
new file mode 100755
index 00000000..371d5ac1
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_company_nor.png differ
diff --git a/flutter_helper/images/ic_main_tab_company_pre.png b/flutter_helper/images/ic_main_tab_company_pre.png
new file mode 100755
index 00000000..83c709f9
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_company_pre.png differ
diff --git a/flutter_helper/images/ic_main_tab_contacts_nor.png b/flutter_helper/images/ic_main_tab_contacts_nor.png
new file mode 100755
index 00000000..fbcc9d58
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_contacts_nor.png differ
diff --git a/flutter_helper/images/ic_main_tab_contacts_pre.png b/flutter_helper/images/ic_main_tab_contacts_pre.png
new file mode 100755
index 00000000..17ad70f0
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_contacts_pre.png differ
diff --git a/flutter_helper/images/ic_main_tab_find_nor.png b/flutter_helper/images/ic_main_tab_find_nor.png
new file mode 100755
index 00000000..89c6433d
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_find_nor.png differ
diff --git a/flutter_helper/images/ic_main_tab_find_pre.png b/flutter_helper/images/ic_main_tab_find_pre.png
new file mode 100755
index 00000000..7bc21fd7
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_find_pre.png differ
diff --git a/flutter_helper/images/ic_main_tab_my_nor.png b/flutter_helper/images/ic_main_tab_my_nor.png
new file mode 100755
index 00000000..0766c144
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_my_nor.png differ
diff --git a/flutter_helper/images/ic_main_tab_my_pre.png b/flutter_helper/images/ic_main_tab_my_pre.png
new file mode 100755
index 00000000..94e689cd
Binary files /dev/null and b/flutter_helper/images/ic_main_tab_my_pre.png differ
diff --git a/flutter_helper/images/ic_purchase_history_blank.jpeg b/flutter_helper/images/ic_purchase_history_blank.jpeg
new file mode 100644
index 00000000..7720479c
Binary files /dev/null and b/flutter_helper/images/ic_purchase_history_blank.jpeg differ
diff --git a/flutter_helper/images/ic_purchase_history_blank.png b/flutter_helper/images/ic_purchase_history_blank.png
new file mode 100644
index 00000000..b1284412
Binary files /dev/null and b/flutter_helper/images/ic_purchase_history_blank.png differ
diff --git a/flutter_helper/images/ic_purchase_history_blank.webp b/flutter_helper/images/ic_purchase_history_blank.webp
new file mode 100644
index 00000000..0acacfba
Binary files /dev/null and b/flutter_helper/images/ic_purchase_history_blank.webp differ
diff --git a/flutter_helper/images/image_-pet-wild.png b/flutter_helper/images/image_-pet-wild.png
new file mode 100644
index 00000000..a1c79ca8
Binary files /dev/null and b/flutter_helper/images/image_-pet-wild.png differ
diff --git a/flutter_helper/images/image_1111.png b/flutter_helper/images/image_1111.png
new file mode 100644
index 00000000..4046de2a
Binary files /dev/null and b/flutter_helper/images/image_1111.png differ
diff --git a/flutter_helper/images/image_2222.png b/flutter_helper/images/image_2222.png
new file mode 100644
index 00000000..897018c4
Binary files /dev/null and b/flutter_helper/images/image_2222.png differ
diff --git a/flutter_helper/images/image_3333.png b/flutter_helper/images/image_3333.png
new file mode 100644
index 00000000..0c8f2c9c
Binary files /dev/null and b/flutter_helper/images/image_3333.png differ
diff --git a/flutter_helper/images/image_and_nature.png b/flutter_helper/images/image_and_nature.png
new file mode 100644
index 00000000..d99e7bdf
Binary files /dev/null and b/flutter_helper/images/image_and_nature.png differ
diff --git a/flutter_helper/images/image_animaltest.png b/flutter_helper/images/image_animaltest.png
new file mode 100644
index 00000000..11beacd1
Binary files /dev/null and b/flutter_helper/images/image_animaltest.png differ
diff --git a/flutter_helper/images/image_domestic_3204653.png b/flutter_helper/images/image_domestic_3204653.png
new file mode 100644
index 00000000..03e4039d
Binary files /dev/null and b/flutter_helper/images/image_domestic_3204653.png differ
diff --git a/flutter_helper/images/image_eye_care.png b/flutter_helper/images/image_eye_care.png
new file mode 100644
index 00000000..062aa2ac
Binary files /dev/null and b/flutter_helper/images/image_eye_care.png differ
diff --git a/flutter_helper/images/image_hospital.png b/flutter_helper/images/image_hospital.png
new file mode 100644
index 00000000..0a230858
Binary files /dev/null and b/flutter_helper/images/image_hospital.png differ
diff --git a/flutter_helper/ios/.gitignore b/flutter_helper/ios/.gitignore
new file mode 100644
index 00000000..e96ef602
--- /dev/null
+++ b/flutter_helper/ios/.gitignore
@@ -0,0 +1,32 @@
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/flutter_helper/ios/Flutter/AppFrameworkInfo.plist b/flutter_helper/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 00000000..f2872cf4
--- /dev/null
+++ b/flutter_helper/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 9.0
+
+
diff --git a/flutter_helper/ios/Flutter/Debug.xcconfig b/flutter_helper/ios/Flutter/Debug.xcconfig
new file mode 100644
index 00000000..ec97fc6f
--- /dev/null
+++ b/flutter_helper/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/flutter_helper/ios/Flutter/Release.xcconfig b/flutter_helper/ios/Flutter/Release.xcconfig
new file mode 100644
index 00000000..c4855bfe
--- /dev/null
+++ b/flutter_helper/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/flutter_helper/ios/Podfile b/flutter_helper/ios/Podfile
new file mode 100644
index 00000000..1e8c3c90
--- /dev/null
+++ b/flutter_helper/ios/Podfile
@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/flutter_helper/ios/Runner.xcodeproj/project.pbxproj b/flutter_helper/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..eb76b764
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,495 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1020;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHelper;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHelper;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHelper;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..1d526a16
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000..f9b0d7c5
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/flutter_helper/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter_helper/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 00000000..a28140cf
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_helper/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter_helper/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..1d526a16
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter_helper/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_helper/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter_helper/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_helper/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000..f9b0d7c5
--- /dev/null
+++ b/flutter_helper/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/flutter_helper/ios/Runner/AppDelegate.swift b/flutter_helper/ios/Runner/AppDelegate.swift
new file mode 100644
index 00000000..70693e4a
--- /dev/null
+++ b/flutter_helper/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 00000000..d36b1fab
--- /dev/null
+++ b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 00000000..dc9ada47
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 00000000..28c6bf03
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 00000000..2ccbfd96
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 00000000..f091b6b0
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 00000000..4cde1211
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 00000000..d0ef06e7
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 00000000..dcdc2306
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 00000000..2ccbfd96
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 00000000..c8f9ed8f
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 00000000..a6d6b860
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 00000000..a6d6b860
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 00000000..75b2d164
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 00000000..c4df70d3
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 00000000..6a84f41e
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 00000000..d0e1f585
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 00000000..0bedcf2f
--- /dev/null
+++ b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 00000000..9da19eac
Binary files /dev/null and b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 00000000..89c2725b
--- /dev/null
+++ b/flutter_helper/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/flutter_helper/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter_helper/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 00000000..f2e259c7
--- /dev/null
+++ b/flutter_helper/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_helper/ios/Runner/Base.lproj/Main.storyboard b/flutter_helper/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 00000000..f3c28516
--- /dev/null
+++ b/flutter_helper/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_helper/ios/Runner/Info.plist b/flutter_helper/ios/Runner/Info.plist
new file mode 100644
index 00000000..b8f70ad9
--- /dev/null
+++ b/flutter_helper/ios/Runner/Info.plist
@@ -0,0 +1,45 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ flutter_helper
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+
+
diff --git a/flutter_helper/ios/Runner/Runner-Bridging-Header.h b/flutter_helper/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 00000000..308a2a56
--- /dev/null
+++ b/flutter_helper/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/flutter_helper/lib/base_app.dart b/flutter_helper/lib/base_app.dart
new file mode 100644
index 00000000..078f58f8
--- /dev/null
+++ b/flutter_helper/lib/base_app.dart
@@ -0,0 +1,12 @@
+import 'package:flutter/cupertino.dart';
+
+abstract class BaseApp extends StatelessWidget {
+ final String name;
+ final String imageName;
+
+ const BaseApp({Key key, this.name, this.imageName}) : super(key: key);
+
+ BaseApp.withNames(this.name, this.imageName) {
+ print('$name - $imageName');
+ }
+}
diff --git a/flutter_helper/lib/boss/boss_app.dart b/flutter_helper/lib/boss/boss_app.dart
new file mode 100644
index 00000000..3d20cf76
--- /dev/null
+++ b/flutter_helper/lib/boss/boss_app.dart
@@ -0,0 +1,23 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_helper/base_app.dart';
+import 'package:flutter_helper/boss/splash.dart';
+
+class BossApp extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ theme: ThemeData(
+ primaryIconTheme: IconThemeData(color: Colors.white),
+ brightness: Brightness.light,
+ primaryColor: Color.fromARGB(255, 0, 215, 198),
+ accentColor: Colors.cyan[300]),
+ home: Scaffold(
+ appBar: AppBar(
+ title: Text("BossApp"),
+ ),
+ body: SplashPage(),
+ ),
+ );
+ }
+}
diff --git a/flutter_helper/lib/boss/chat/chat_page.dart b/flutter_helper/lib/boss/chat/chat_page.dart
new file mode 100644
index 00000000..42db3a77
--- /dev/null
+++ b/flutter_helper/lib/boss/chat/chat_page.dart
@@ -0,0 +1,43 @@
+import 'package:flutter/material.dart';
+
+class ChatPage extends StatefulWidget {
+ @override
+ _ChatPageState createState() => _ChatPageState();
+}
+
+class _ChatPageState extends State
+ with AutomaticKeepAliveClientMixin {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ elevation: 0.0,
+ centerTitle: true,
+ title: Text(
+ '聊 天',
+ style: TextStyle(
+ fontSize: 20.0,
+ color: Colors.white,
+ ),
+ ),
+ ),
+ body: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(
+ '暂无消息',
+ style: TextStyle(
+ color: Colors.grey,
+ fontSize: 26.0,
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ @override
+ bool get wantKeepAlive => true;
+}
diff --git a/flutter_helper/lib/boss/company/company.dart b/flutter_helper/lib/boss/company/company.dart
new file mode 100644
index 00000000..b3586a23
--- /dev/null
+++ b/flutter_helper/lib/boss/company/company.dart
@@ -0,0 +1,18 @@
+class Company {
+ final String id;
+ final String company;
+ final String logo;
+ final String info;
+ final String hot;
+
+ Company({this.id, this.company, this.logo, this.info, this.hot});
+
+ factory Company.fromJson(Map json) {
+ return Company(
+ id: json['id'],
+ company: json['company'],
+ logo: json['logo'],
+ info: json['info'],
+ hot: json['hot']);
+ }
+}
diff --git a/flutter_helper/lib/boss/company/company_detail.dart b/flutter_helper/lib/boss/company/company_detail.dart
new file mode 100644
index 00000000..00d59237
--- /dev/null
+++ b/flutter_helper/lib/boss/company/company_detail.dart
@@ -0,0 +1,14 @@
+class CompanyDetail {
+ final String id;
+ final String inc;
+ final List companyImgsResult;
+
+ CompanyDetail({this.id, this.inc, this.companyImgsResult});
+
+ factory CompanyDetail.fromJson(Map json) {
+ return CompanyDetail(
+ id: json['id'],
+ inc: json['inc'],
+ companyImgsResult: json['companyImgsResult'] as List);
+ }
+}
\ No newline at end of file
diff --git a/flutter_helper/lib/boss/company/company_item.dart b/flutter_helper/lib/boss/company/company_item.dart
new file mode 100644
index 00000000..4891e08f
--- /dev/null
+++ b/flutter_helper/lib/boss/company/company_item.dart
@@ -0,0 +1,79 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+import 'company.dart';
+
+class CompanyItem extends StatelessWidget {
+ final Company company;
+ final String heroLogo;
+ VoidCallback onPressed;
+
+ CompanyItem({Key key, this.company, this.heroLogo, this.onPressed})
+ : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ onTap: onPressed,
+ child: Container(
+ margin: EdgeInsets.only(bottom: 10.0),
+ padding: EdgeInsets.fromLTRB(18.0, 10.0, 18.0, 10.0),
+ color: Colors.white,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Row(
+ children: [
+ Padding(
+ padding: EdgeInsets.only(right: 20.0),
+ child: Hero(
+ tag: heroLogo,
+ child: Image.network(
+ company.logo,
+ width: 40,
+ ),
+ ),
+ ),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: EdgeInsets.only(bottom: 6.0),
+ child: Text(
+ company.company,
+ style: TextStyle(
+ color: Colors.black,
+ fontSize: 16,
+ ),
+ ),
+ ),
+ Text(
+ company.info,
+ style: TextStyle(
+ color: Colors.grey,
+ fontSize: 12,
+ ),
+ )
+ ],
+ ),
+ ],
+ ),
+ Container(
+ decoration: BoxDecoration(
+ color: new Color(0xFFF6F6F8),
+ borderRadius: BorderRadius.all(Radius.circular(6.0)),
+ ),
+ padding: EdgeInsets.fromLTRB(3.0, 3.0, 8.0, 8.0),
+ margin: EdgeInsets.only(top: 12.0),
+ child: Text(
+ company.hot,
+ style: TextStyle(color: Color(0xFF9fa3b0)),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/flutter_helper/lib/boss/company/company_page.dart b/flutter_helper/lib/boss/company/company_page.dart
new file mode 100644
index 00000000..016da501
--- /dev/null
+++ b/flutter_helper/lib/boss/company/company_page.dart
@@ -0,0 +1,96 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_helper/boss/company/company.dart';
+import 'package:flutter_helper/boss/company/company_item.dart';
+
+import 'company_page_detail.dart';
+
+class CompanyPage extends StatefulWidget {
+ @override
+ _CompanyPageState createState() => _CompanyPageState();
+}
+
+class _CompanyPageState extends State
+ with AutomaticKeepAliveClientMixin {
+ Future> _fetchCompanyList() async {
+ List companyList = [];
+ for (int i = 0; i < 100; i++) {
+ companyList.add(Company(
+ id: "$i",
+ company: "科大讯飞$i",
+ logo:
+ "https://img.bosszhipin.com/beijin/mcs/useravatar/20171211/4d147d8bb3e2a3478e20b50ad614f4d02062e3aec7ce2519b427d24a3f300d68_s.jpg",
+ info: "已经上市移动互联网",
+ hot: "热🔥招:高级测试工程师 15k-18k",
+ ));
+ }
+ return companyList;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ elevation: 0.0,
+ centerTitle: true,
+ title: Text(
+ '公 司',
+ style: TextStyle(fontSize: 20.0, color: Colors.white),
+ ),
+ actions: [
+ IconButton(
+ onPressed: () {},
+ icon: Icon(
+ Icons.search,
+ color: Colors.white,
+ ),
+ ),
+ ],
+ ),
+ body: Center(
+ child: FutureBuilder(
+ future: _fetchCompanyList(),
+ builder: (context, snapshot) {
+ if (ConnectionState.none == snapshot.connectionState ||
+ ConnectionState.waiting == snapshot.connectionState) {
+ return CircularProgressIndicator();
+ } else if (snapshot.hasError) {
+ return Text('Error: ${snapshot.error}');
+ } else {
+ return _createListView(context, snapshot);
+ }
+ },
+ ),
+ ),
+ );
+ }
+
+ @override
+ bool get wantKeepAlive => true;
+
+ Widget _createListView(
+ BuildContext context, AsyncSnapshot snapshot) {
+ List companyList = snapshot.data;
+ return ListView.builder(
+ key: new PageStorageKey('company-list'),
+ itemCount: companyList.length,
+ itemBuilder: (BuildContext context, int index) {
+ return CompanyItem(
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ // fullscreenDialog: true,
+ builder: (context) => CompanyDetailPage(
+ company: companyList[index],
+ heroLogo: "heroLogo$index",
+ ),
+ ),
+ );
+ },
+ company: companyList[index],
+ heroLogo: "heroLogo${index}",
+ );
+ },
+ );
+ }
+}
diff --git a/flutter_helper/lib/boss/company/company_page_detail.dart b/flutter_helper/lib/boss/company/company_page_detail.dart
new file mode 100644
index 00000000..7cf08579
--- /dev/null
+++ b/flutter_helper/lib/boss/company/company_page_detail.dart
@@ -0,0 +1,381 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_helper/boss/company/company.dart';
+import 'package:flutter_helper/boss/company/company_detail.dart';
+import 'package:flutter_helper/boss/company/scroll_img_item.dart';
+import 'package:flutter_helper/boss/company/welfare_item.dart';
+
+import 'gallery_page.dart';
+
+class CompanyDetailPage extends StatefulWidget {
+ final Company company;
+ final String heroLogo;
+
+ const CompanyDetailPage({Key key, this.company, this.heroLogo})
+ : super(key: key);
+
+ @override
+ State createState() => _CompanyDetailPageState();
+}
+
+class _CompanyDetailPageState extends State
+ with SingleTickerProviderStateMixin {
+ ScrollController _scrollController;
+ bool _isShow = false;
+
+ Future _fetchCompan() async {
+ return CompanyDetail(
+ id: "id",
+ inc: "无锡红光标牌有限公司是一家集研发、生产、销售和服务于一体的专业标牌生产厂家。注册资金500万人民币。主要生产塑料基材、软塑透明树脂、金属、模内复合等标牌产品,洗衣机顶盖板总成,平衡板,以及塑印、彩印、顶盖板、吸音垫等产品。公司位于长江三角洲经济快速增长、风景秀丽的太湖之畔——无锡。 公司自1984年成立至今,已经过了3次跨越式的发展。2004年至今公司投入5000多万元资金建设新的生产基地,目前已竣工并投入生产,占地面积达40000m2,厂房面积近15000m2。公司2004年的年产值达4350多万元,并且每年以平均30%的速度快速增长。目前,本公司的产品已具备国际及国内多项质量认证证书,并为知名家用电器企业:小天鹅电器有限公司、三星电子有限公司、海尔集团、惠尔普等配套生产各类标牌。可以说客户是我们的老师,和他们合作使我们得到很多的学习机会来提高自身的技术水平和管理水平,是我们生产和发展的动力。 公司本着“千方百计生产出满足顾客期望和要求的产品”的宗旨,坚持“工厂出产的不仅仅是产品,更重要的是信誉和质量”的经营理念,不断吸收新技术、引进新设备,使公司的经济效益蒸蒸日上。相信公司将会永不停止探索和发展的脚步,和中国国内以及世界国际性大公司同步发展。",
+ companyImgsResult: [
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F017b2a5938c8bca8012193a37db72c.jpg%402o.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630492567&t=e72260aeba623b96fafb25502781e504',
+ ],
+ );
+ }
+
+ _scrollListener() {
+ setState(() {
+ if (_scrollController.offset < 56 && _isShow) {
+ _isShow = false;
+ } else if (_scrollController.offset >= 56 && _isShow == false) {
+ _isShow = true;
+ }
+ });
+ }
+
+ @override
+ void initState() {
+ _scrollController = ScrollController();
+ _scrollController.addListener(_scrollListener);
+ super.initState();
+ }
+
+ @override
+ void dispose() {
+ _scrollController.removeListener(_scrollListener);
+ _scrollController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Center(
+ child: Scaffold(
+ backgroundColor: Color.fromARGB(255, 68, 76, 96),
+ body: Container(
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ colorFilter: ColorFilter.mode(
+ Colors.black.withOpacity(0.1),
+ BlendMode.dstATop,
+ ),
+ fit: BoxFit.cover,
+ image: NetworkImage(widget.company.logo),
+ alignment: Alignment.center,
+ ),
+ ),
+ child: _companyDetailView(context),
+ ),
+ ),
+ );
+ }
+
+ _companyDetailView(BuildContext context) {
+ return Stack(
+ alignment: Alignment.bottomCenter,
+ children: [
+ CustomScrollView(
+ controller: _scrollController,
+ slivers: [
+ _buildSliverAppBar(),
+ _buildSliverList(),
+ ],
+ ),
+ ],
+ );
+ }
+
+ Widget _buildSliverAppBar() {
+ return SliverAppBar(
+ elevation: 0.0,
+ pinned: true,
+ backgroundColor: Color.fromARGB(_isShow ? 255 : 0, 68, 76, 96),
+ centerTitle: false,
+ title: Text(
+ widget.company.company,
+ style: TextStyle(
+ fontSize: 20.0,
+ color: Color.fromARGB(_isShow ? 255 : 0, 255, 255, 255),
+ ),
+ ),
+ actions: [
+ IconButton(
+ onPressed: () {},
+ icon: Icon(
+ Icons.search,
+ color: Colors.white,
+ ))
+ ],
+ );
+ }
+
+ Widget _buildSliverList() {
+ return SliverList(
+ delegate: SliverChildListDelegate(
+ [
+ Row(
+ children: [
+ Expanded(
+ flex: 3,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: EdgeInsets.only(
+ top: 20.0,
+ left: 25.0,
+ bottom: 10.0,
+ ),
+ child: Text(
+ '${widget.company.company}',
+ style: TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 25.0,
+ ),
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.only(left: 25.0),
+ child: Text(
+ '${widget.company.info}',
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 25.0,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Expanded(
+ child: Padding(
+ padding: EdgeInsets.only(
+ top: 25.0,
+ right: 30.0,
+ ),
+ child: Hero(
+ tag: widget.heroLogo,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(8.0),
+ child: Image.network(
+ widget.company.logo,
+ width: 70,
+ height: 70,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ FutureBuilder(
+ future: _fetchCompan(),
+ builder: (context, snapshot) {
+ if (snapshot.hasData) {
+ return _companBody(context, snapshot);
+ } else if (snapshot.hasError) {
+ return Text('${snapshot.error}');
+ } else {
+ return Center(
+ child: CircularProgressIndicator(),
+ );
+ }
+ },
+ ),
+ ],
+ ),
+ );
+ }
+
+ // 主体
+ Widget _companBody(
+ BuildContext context, AsyncSnapshot