mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Add references support
This commit is contained in:
@ -22,10 +22,6 @@ import 'login_route.dart';
|
||||
class HomeRoute extends StatefulWidget {
|
||||
@override
|
||||
State<StatefulWidget> createState() => _HomeRouteState();
|
||||
|
||||
/// Get current instance of Home controller
|
||||
static HomeController of(BuildContext context) =>
|
||||
context.findAncestorStateOfType<HomeController>();
|
||||
}
|
||||
|
||||
class CurrPage {
|
||||
@ -45,6 +41,11 @@ class CurrPage {
|
||||
|
||||
/// Public interface of home controller
|
||||
abstract class HomeController extends State<HomeRoute> {
|
||||
|
||||
/// Get current instance of Home controller
|
||||
static HomeController of(BuildContext context) =>
|
||||
context.findAncestorStateOfType<HomeController>();
|
||||
|
||||
/// Open a specific group page specified by its [groupID]
|
||||
void openGroup(int groupID);
|
||||
}
|
||||
|
Reference in New Issue
Block a user