Add a containerfile
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
// This project is not supposed to be cross-platform,
|
||||
// so we don't care about this warning
|
||||
// ignore: avoid_web_libraries_in_flutter
|
||||
import 'dart:html';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:softplayer_web/components/sign_in_form.dart';
|
||||
|
||||
/// Flutter code sample for [AppBar].
|
||||
|
||||
class MenuPanel extends StatefulWidget implements PreferredSizeWidget {
|
||||
final TabName tab;
|
||||
const MenuPanel({super.key, required this.tab})
|
||||
: preferredSize = const Size.fromHeight(kToolbarHeight);
|
||||
@override
|
||||
final Size preferredSize; // default is 56.0
|
||||
final Size preferredSize;
|
||||
@override
|
||||
State<StatefulWidget> createState() => _MenuPanel();
|
||||
}
|
||||
@ -21,6 +22,7 @@ class _MenuPanel extends State<MenuPanel> {
|
||||
bool isSignedIn() {
|
||||
return window.localStorage.containsKey("token");
|
||||
}
|
||||
|
||||
List<Widget> accountActions() {
|
||||
if (isSignedIn()) {
|
||||
return [
|
||||
@ -37,7 +39,8 @@ class _MenuPanel extends State<MenuPanel> {
|
||||
builder: (BuildContext context) => const SignInForm());
|
||||
},
|
||||
child: const Text("sign in")),
|
||||
TextButton(onPressed: () => print("sign up"), child: const Text("sign up")),
|
||||
TextButton(
|
||||
onPressed: () => print("sign up"), child: const Text("sign up")),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user