王亚玲 2 years ago
parent fa4082ee7a
commit a1678451ac

@ -1,7 +1,7 @@
# This is a generated file; do not edit or check into version control.
package_info_plus=/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.2/
package_info_plus_linux=/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_linux-1.0.5/
package_info_plus_macos=/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_macos-1.3.0/
package_info_plus_web=/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_web-1.0.5/
package_info_plus_windows=/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_windows-1.0.5/
r_upgrade=/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/r_upgrade-0.3.8+2/
package_info_plus=/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.2/
package_info_plus_linux=/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_linux-1.0.5/
package_info_plus_macos=/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_macos-1.3.0/
package_info_plus_web=/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_web-1.0.5/
package_info_plus_windows=/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_windows-1.0.5/
r_upgrade=/Users/datang/.pub-cache/hosted/pub.dartlang.org/r_upgrade-0.3.8+2/

@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"package_info_plus","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.2/","native_build":true,"dependencies":[]},{"name":"r_upgrade","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/r_upgrade-0.3.8+2/","native_build":true,"dependencies":[]}],"android":[{"name":"package_info_plus","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.2/","native_build":true,"dependencies":[]},{"name":"r_upgrade","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/r_upgrade-0.3.8+2/","native_build":true,"dependencies":[]}],"macos":[{"name":"package_info_plus_macos","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_macos-1.3.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"package_info_plus_linux","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_linux-1.0.5/","native_build":false,"dependencies":[]}],"windows":[{"name":"package_info_plus_windows","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_windows-1.0.5/","native_build":false,"dependencies":[]}],"web":[{"name":"package_info_plus_web","path":"/Users/zhangmeng/.pub-cache/hosted/pub.dartlang.org/package_info_plus_web-1.0.5/","dependencies":[]}]},"dependencyGraph":[{"name":"package_info_plus","dependencies":["package_info_plus_linux","package_info_plus_macos","package_info_plus_windows","package_info_plus_web"]},{"name":"package_info_plus_linux","dependencies":[]},{"name":"package_info_plus_macos","dependencies":[]},{"name":"package_info_plus_web","dependencies":[]},{"name":"package_info_plus_windows","dependencies":[]},{"name":"r_upgrade","dependencies":[]}],"date_created":"2022-06-07 14:38:49.619690","version":"3.0.0"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"package_info_plus","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.2/","native_build":true,"dependencies":[]},{"name":"r_upgrade","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/r_upgrade-0.3.8+2/","native_build":true,"dependencies":[]}],"android":[{"name":"package_info_plus","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus-1.4.2/","native_build":true,"dependencies":[]},{"name":"r_upgrade","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/r_upgrade-0.3.8+2/","native_build":true,"dependencies":[]}],"macos":[{"name":"package_info_plus_macos","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_macos-1.3.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"package_info_plus_linux","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_linux-1.0.5/","native_build":false,"dependencies":[]}],"windows":[{"name":"package_info_plus_windows","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_windows-1.0.5/","native_build":false,"dependencies":[]}],"web":[{"name":"package_info_plus_web","path":"/Users/datang/.pub-cache/hosted/pub.dartlang.org/package_info_plus_web-1.0.5/","dependencies":[]}]},"dependencyGraph":[{"name":"package_info_plus","dependencies":["package_info_plus_linux","package_info_plus_macos","package_info_plus_windows","package_info_plus_web"]},{"name":"package_info_plus_linux","dependencies":[]},{"name":"package_info_plus_macos","dependencies":[]},{"name":"package_info_plus_web","dependencies":[]},{"name":"package_info_plus_windows","dependencies":[]},{"name":"r_upgrade","dependencies":[]}],"date_created":"2022-06-24 11:54:55.391030","version":"3.0.2"}

@ -36,9 +36,14 @@ enum AndroidStoreName {
final String name;
final String packageName;
static AndroidStoreName getValue(String packageName) =>
AndroidStoreName.values
.firstWhere((element) => element.packageName == packageName);
static AndroidStoreName getValue(String packageName) {
var re =AndroidStoreName.values
.firstWhere((element) => element.packageName == packageName,orElse: ()=>-1);
if(re=1)
return ;
}
AndroidStore get getAndroidStore => AndroidStore.internal(packageName);
@ -159,6 +164,7 @@ class AppUpgrade {
Expanded(
child: MaterialButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text(
@ -183,31 +189,38 @@ class AppUpgrade {
onPressed: () async {
Navigator.pop(context);
if (Platform.isAndroid) {
var stores = await RUpgrade.androidStores;
var stores = await RUpgrade.androidStores;///
if (stores == null || stores.isEmpty) {
onLaunchFail?.call();
return;
}
print(stores);
AndroidStoreName? selectStore;
await showModalBottomSheet(
isDismissible: false,
context: context,
builder: (context) {
return FittedBox(
return SizedBox(
height:450,
child: ListView.separated(
itemBuilder: (context, index) {
var value =
AndroidStoreName.getValue(
stores[index].packageName);
return GestureDetector(
onTap: () {
Navigator.pop(context);
selectStore = value;
},
child: Center(
child: Text(value.name),
),
);
print("这是${value}");
print("这是${ stores[index].packageName}");
return Container();
// return GestureDetector(
// onTap: () {
// Navigator.pop(context);
// selectStore = value;
// },
// child: Center(
// child: Text(value.name),
// ),
// );
},
separatorBuilder: (context, index) {
return const SizedBox(
@ -215,7 +228,10 @@ class AppUpgrade {
);
},
itemCount: stores.length),
);
)
;
});
if (selectStore == null) return;

Loading…
Cancel
Save