1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-28 13:58:51 +00:00
comunicmobile/lib/ui/widgets/safe_state.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);
}
}