1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-30 00:36:28 +00:00
comunicmobile/lib/ui/widgets/safe_state.dart

13 lines
261 B
Dart
Raw Normal View History

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);
}
}