Hi guys! I m building a flutter app for smartwatches and i start with Samsung Galaxy Watch 4 SM R870. In every single place where i add a duration for animation the duration is 10 time faster. On an emulator of smart watch from Android Studio andorid sdk 30 it s everything fine.
Here is flutter-tizen -v
:
[!] Flutter (Channel unknown, 3.3.7, on Microsoft Windows [Version 10.0.19045.2364], locale en-US)
! Flutter version 3.3.7 on channel unknown at C:\flutter-tizen\flutter
! Upstream repository unknown
• Framework revision e99c9c7cd9 (9 weeks ago), 2022-11-01 16:59:00 -0700
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0
[√] Tizen toolchain - develop for Tizen devices
• Framework revision 11d0f3de27 (2 weeks ago), 2022-12-20 19:45:26 +0900
• Engine revision 2874fe8bdda2814a59244f329f331e35f73e46d9
• Tizen Studio 5.0 at C:\tizen-studio
• .NET SDK 7.0.101 at C:\Program Files\dotnet\dotnet.exe
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at C:\Users\xMihaix\AppData\Local\Android\sdk
• Platform android-TiramisuPrivacySandbox, build-tools 33.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.22)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.33130.400
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
[√] VS Code (version 1.74.2)
• VS Code at C:\Users\xMihaix\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.56.0
[√] Connected device (5 available)
• SM R870 (mobile) • 192.168.1.213:5555 • android-arm • Android 11 (API 30)
• sdk gwear x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2364]
• Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.125
• Edge (web) • edge • web-javascript • Microsoft Edge 108.0.1462.54
[√] HTTP Host Availability
• All required HTTP hosts are available
And here is an example of code where i m using animations with duration:
import 'dart:async';
import 'package:avatar_glow/avatar_glow.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:wearable_rotary/wearable_rotary.dart';
import '../exports.dart';
class Home extends StatefulWidget {
const Home({super.key});
@override
State<Home> createState() => _HomeState();
}
class _HomeState extends State<Home> {
Duration duration = const Duration(seconds: 10);
bool training = false;
double x = 0;
Stream bezel = rotaryEvents;
List<List> iconData = [
['qr_code', 29.45, 29.45, const QrCode()],
['notification', 26.35, 31.18, const Scaffold()],
['trening', 27.0, 26.0, const Workout()],
['calories', 24.5, 29.45, const Calories()]
];
Widget customIcons(int i) => InkWell(
splashColor: secondaryColor,
borderRadius: BorderRadius.circular(10),
onTap: () => nav(iconData[i][3], context),
child: AnimatedRotation(
duration: duration,
turns: -x / 1360,
child: CustomPaint(
foregroundPainter: BorderPainter(10),
child: Container(
alignment: Alignment.center,
width: adaptive(55, context),
height: adaptive(55, context),
decoration: BoxDecoration(
color: shadowColor,
borderRadius: BorderRadius.circular(10),
),
child: SvgPicture.asset(
'assets/svg/${iconData[i][0]}.svg',
width: adaptive(iconData[i][1], context),
height: adaptive(iconData[i][2], context),
),
),
),
),
);
@override
void initState() {
super.initState();
bezel.listen((event) => setState(() => x = x +
((event.direction == RotaryDirection.clockwise ? 1 : -1) *
event.magnitude)));
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: backgroundScaffold,
body: Container(
padding: EdgeInsets.all(adaptive(15, context)),
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: Stack(
alignment: Alignment.center,
children: [
AvatarGlow(
repeat: true,
animate: training,
showTwoGlows: false,
glowColor: primaryColor,
endRadius: adaptive(40, context),
duration: const Duration(seconds: 1),
child: Center(
child: GestureDetector(
onTap: () => setState(() => training = !training),
child: SvgPicture.asset('assets/svg/logo.svg'),
),
),
),
AnimatedRotation(
duration: duration,
turns: x / 1360,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
customIcons(0),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
customIcons(1),
customIcons(2),
],
),
customIcons(3),
],
),
),
],
),
),
);
}
}
In the case that is matter i cannot use flutter-tizen run
No supported devices found with name or id matching 'tizen'.
The following devices were found:
SM R870 (mobile) • 192.168.1.213:5555 • android-arm • Android 11 (API 30)
sdk gwear x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2364]
Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.125
Edge (web) • edge • web-javascript • Microsoft Edge 108.0.1462.54
I start using flutter-tizen 2 weeks ago so maybe I m missed informed