claude refactorings, flutter best practices, platform dependent changes, general cleanup
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:animated_digit/animated_digit.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedTime extends StatefulWidget {
|
||||
@@ -42,14 +41,18 @@ class _AnimatedTimeState extends State<AnimatedTime> {
|
||||
],
|
||||
);
|
||||
|
||||
AnimatedDigitWidget buildWidget(int value) => AnimatedDigitWidget(
|
||||
value: value,
|
||||
duration: const Duration(milliseconds: 100),
|
||||
textStyle: TextStyle(
|
||||
fontSize: 15,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
);
|
||||
Widget buildWidget(int value) => AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 100),
|
||||
transitionBuilder: (child, animation) => FadeTransition(opacity: animation, child: child),
|
||||
child: Text(
|
||||
'$value',
|
||||
key: ValueKey<int>(value),
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
|
||||
Reference in New Issue
Block a user