mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-17 21:50:21 -04:00
checkpoint
This commit is contained in:
parent
ff14969ffa
commit
a6ba08255b
34 changed files with 1301 additions and 706 deletions
42
lib/layout/home/home_shell.dart
Normal file
42
lib/layout/home/home_shell.dart
Normal file
|
@ -0,0 +1,42 @@
|
|||
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)));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue