add setter for frame interval, separate FilamentController initialization from widget

This commit is contained in:
Nick Fisher
2022-09-01 14:26:31 +10:00
parent f68fea29d8
commit dc9e639c40
8 changed files with 134 additions and 33 deletions

View File

@@ -95,20 +95,22 @@ class _GestureDetectingFilamentViewState
},
child: FilamentWidget(controller: widget.controller))),
widget.showControls
? Align(alignment:Alignment.bottomRight, child:GestureDetector(
onTap: () {
setState(() {
_rotate = !_rotate;
_setFunction();
});
},
child: Container(
padding: const EdgeInsets.all(50),
child: Icon(Icons.rotate_90_degrees_ccw,
color: _rotate
? Colors.white
: Colors.white.withOpacity(0.5))),
))
? Align(
alignment: Alignment.bottomRight,
child: GestureDetector(
onTap: () {
setState(() {
_rotate = !_rotate;
_setFunction();
});
},
child: Container(
padding: const EdgeInsets.all(50),
child: Icon(Icons.rotate_90_degrees_ccw,
color: _rotate
? Colors.white
: Colors.white.withOpacity(0.5))),
))
: Container()
]);
}