mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2024-12-11 17:14:32 -05:00
43 lines
1005 B
Dart
43 lines
1005 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../theme/theme.dart';
|
|
|
|
class HomeShell extends StatefulWidget {
|
|
const HomeShell({required this.child, super.key});
|
|
|
|
@override
|
|
HomeShellState createState() => HomeShellState();
|
|
|
|
final Widget child;
|
|
}
|
|
|
|
class HomeShellState extends State<HomeShell> {
|
|
final _unfocusNode = FocusNode();
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_unfocusNode.dispose();
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
final scale = theme.extension<ScaleScheme>()!;
|
|
|
|
// XXX: eventually write account switcher here
|
|
return SafeArea(
|
|
child: GestureDetector(
|
|
onTap: () => FocusScope.of(context).requestFocus(_unfocusNode),
|
|
child: DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
color: scale.primaryScale.activeElementBackground),
|
|
child: widget.child)));
|
|
}
|
|
}
|