kidd3166 пре 2 година
родитељ
комит
742946ea89

+ 1 - 1
lib/pages/game/game_detail.dart

@@ -729,7 +729,7 @@ class _GameDetailPageState extends State<GameDetailsPage> with TickerProviderSta
         NavigatorUtil.goGameHistory(context, widget.details);
         break;
       case '游戏规则':
-        NavigatorUtil.goPage(context, (context) => WebPage(url: "https://xie-web.funfet.com/index.html#/pages/Rules/index?name=${GAME_RULE[widget.details.id]}"));
+        NavigatorUtil.goPage(context, (context) => WebPage(url: "https://m.funfet.com/index.html#/pages/Rules/index?name=${GAME_RULE[widget.details.id]}"));
         break;
       // case '操作指引':
       //   NavigatorUtil.goPage(context, (context) => WebPage(url: "http://xie-web.hiyd.com/index.html#/game_guide?id=${widget.details.id}"));

+ 1 - 1
lib/pages/home/guide_page.dart

@@ -53,7 +53,7 @@ class _PageState extends State<GuidePage> {
               child: Stack(
                 children: [
                   WebView(
-                    initialUrl: "https://xie-web.funfet.com/index.html#/pages/Guide/Index/index?is=1",
+                    initialUrl: "https://m.funfet.com/index.html#/pages/Guide/Index/index?is=1",
                     javascriptMode: JavascriptMode.unrestricted,
                     initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.always_allow,
                     allowsInlineMediaPlayback: true,

+ 7 - 5
plugin/pedometer-2.1.0/android/src/main/kotlin/com/example/pedometer/SensorStreamHandler.kt

@@ -14,22 +14,24 @@ class SensorStreamHandler() : EventChannel.StreamHandler {
     private var sensor: Sensor? = null
     private lateinit var context: Context
     private lateinit var sensorName: String
+    private var sensorType: Int = Sensor.TYPE_STEP_COUNTER
     private lateinit var flutterPluginBinding: FlutterPlugin.FlutterPluginBinding
 
     constructor(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding, sensorType: Int) : this() {
         this.context = flutterPluginBinding.applicationContext
+        this.sensorType = sensorType
         this.sensorName = if (sensorType == Sensor.TYPE_STEP_COUNTER) "StepCount" else "StepDetection"
+        this.flutterPluginBinding = flutterPluginBinding
+    }
+
+    override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
+        println("SensorStreamHandler onListen $sensorName $sensor")
         sensorManager = context.getSystemService(Context.SENSOR_SERVICE) as SensorManager
         sensor = if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
             sensorManager!!.getDefaultSensor(sensorType, true)
         }else{
             sensorManager!!.getDefaultSensor(sensorType)
         }
-        this.flutterPluginBinding = flutterPluginBinding
-    }
-
-    override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
-        println("SensorStreamHandler onListen $sensorName $sensor")
         if (sensor == null) {
             if(this.sensorName == "StepDetection") {
                 sensorEventListener = object : StepDetector() {

+ 1 - 1
pubspec.yaml

@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
 # Read more about iOS versioning at
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.5.2+15203
+version: 1.5.3+15303
 
 environment:
   sdk: ">=2.16.0 <3.0.0"