softplayer-web/lib/helpers/page_wrapper.dart

29 lines
639 B
Dart
Raw Normal View History

2024-04-19 11:19:44 +00:00
import 'dart:html';
2024-04-04 14:35:33 +00:00
import 'package:flutter/material.dart';
2024-04-19 11:19:44 +00:00
import 'package:softplayer_web/api/grpc/accounts.dart';
2024-04-04 14:35:33 +00:00
import 'package:softplayer_web/components/menubar.dart';
2024-04-04 16:15:30 +00:00
class PageWrapper extends StatelessWidget {
2024-04-04 14:35:33 +00:00
final Widget child;
final MenuPanel appBar;
2024-04-19 11:19:44 +00:00
const PageWrapper(
{super.key,
required this.child,
required this.appBar,
required this.accountsGrpc});
final AccountsGrpc accountsGrpc;
bool isSignedIn() {
return window.localStorage.containsKey("token");
}
2024-04-04 16:15:30 +00:00
2024-04-04 14:35:33 +00:00
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: appBar,
body: child,
);
}
}