mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-29 06:18:51 +00:00
13 lines
261 B
Dart
13 lines
261 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
/// Little State hack to avoid issues
|
||
|
///
|
||
|
/// @author Pierre HUBERT
|
||
|
|
||
|
abstract class SafeState<T extends StatefulWidget> extends State<T> {
|
||
|
@override
|
||
|
void setState(fn) {
|
||
|
if(mounted)
|
||
|
super.setState(fn);
|
||
|
}
|
||
|
}
|