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