This commit is contained in:
parent
874f5319fd
commit
58841986f3
@ -39,10 +39,25 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
||||
actions: [
|
||||
Row(
|
||||
children: [
|
||||
const Text("Advanced"),
|
||||
IconButton(
|
||||
icon: Icon(_showAdvanced ? Icons.toggle_on : Icons.toggle_off),
|
||||
onPressed: () => setState(() => _showAdvanced = !_showAdvanced),
|
||||
Row(
|
||||
children: [
|
||||
const Text("Advanced"),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
_showAdvanced ? Icons.toggle_on : Icons.toggle_off,
|
||||
),
|
||||
onPressed:
|
||||
() => setState(() => _showAdvanced = !_showAdvanced),
|
||||
),
|
||||
],
|
||||
),
|
||||
Consumer<Auth>(
|
||||
builder: (context, auth, _) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.logout),
|
||||
onPressed: () => auth.logoff(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -1,6 +1,9 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:repertory/constants.dart' as constants;
|
||||
import 'package:repertory/models/auth.dart';
|
||||
import 'package:repertory/models/mount.dart';
|
||||
import 'package:repertory/widgets/mount_settings.dart';
|
||||
|
||||
@ -25,10 +28,25 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
||||
actions: [
|
||||
Row(
|
||||
children: [
|
||||
const Text("Advanced"),
|
||||
IconButton(
|
||||
icon: Icon(_showAdvanced ? Icons.toggle_on : Icons.toggle_off),
|
||||
onPressed: () => setState(() => _showAdvanced = !_showAdvanced),
|
||||
Row(
|
||||
children: [
|
||||
const Text("Advanced"),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
_showAdvanced ? Icons.toggle_on : Icons.toggle_off,
|
||||
),
|
||||
onPressed:
|
||||
() => setState(() => _showAdvanced = !_showAdvanced),
|
||||
),
|
||||
],
|
||||
),
|
||||
Consumer<Auth>(
|
||||
builder: (context, auth, _) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.logout),
|
||||
onPressed: () => auth.logoff(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -22,6 +22,16 @@ class _EditSettingsScreenState extends State<EditSettingsScreen> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
||||
title: Text(widget.title),
|
||||
actions: [
|
||||
Consumer<Auth>(
|
||||
builder: (context, auth, _) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.logout),
|
||||
onPressed: () => auth.logoff(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: FutureBuilder(
|
||||
builder: (context, snapshot) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:repertory/constants.dart' as constants;
|
||||
import 'package:repertory/models/auth.dart';
|
||||
import 'package:repertory/widgets/mount_list_widget.dart';
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
@ -21,6 +23,16 @@ class _HomeScreeState extends State<HomeScreen> {
|
||||
icon: const Icon(Icons.storage),
|
||||
),
|
||||
title: Text(widget.title),
|
||||
actions: [
|
||||
Consumer<Auth>(
|
||||
builder: (context, auth, _) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.logout),
|
||||
onPressed: () => auth.logoff(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(constants.padding),
|
||||
|
Loading…
x
Reference in New Issue
Block a user