mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Many many changes for null-safety support
This commit is contained in:
parent
2988716bf3
commit
d3eec6a79e
30 changed files with 563 additions and 456 deletions
|
|
@ -4,13 +4,13 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
|
||||
class Spinner extends StatefulWidget {
|
||||
final IconData icon;
|
||||
final IconData? icon;
|
||||
final Duration duration;
|
||||
final Color color;
|
||||
|
||||
const Spinner({
|
||||
this.color = const Color.fromRGBO(150, 150, 150, 1),
|
||||
Key key,
|
||||
Key? key,
|
||||
@required this.icon,
|
||||
this.duration = const Duration(milliseconds: 1800),
|
||||
}) : super(key: key);
|
||||
|
|
@ -20,8 +20,8 @@ class Spinner extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _SpinnerState extends State<Spinner> with SingleTickerProviderStateMixin {
|
||||
AnimationController _controller;
|
||||
Widget _child;
|
||||
AnimationController? _controller;
|
||||
Widget? _child;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -40,14 +40,14 @@ class _SpinnerState extends State<Spinner> with SingleTickerProviderStateMixin {
|
|||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
_controller!.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RotationTransition(
|
||||
turns: _controller,
|
||||
turns: _controller!,
|
||||
child: _child,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue