|
|
@ -3,6 +3,7 @@ import 'package:flutter/animation.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:dde_gesture_manager/extensions.dart';
|
|
|
|
import 'package:dde_gesture_manager/extensions.dart';
|
|
|
|
|
|
|
|
import 'package:dde_gesture_manager/constants/constants.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class LocalManager extends StatelessWidget {
|
|
|
|
class LocalManager extends StatelessWidget {
|
|
|
|
const LocalManager({
|
|
|
|
const LocalManager({
|
|
|
@ -12,18 +13,18 @@ class LocalManager extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
var isOpen = context.watch<ContentLayoutProvider>().localManagerOpened == true;
|
|
|
|
var isOpen = context.watch<ContentLayoutProvider>().localManagerOpened == true;
|
|
|
|
isOpen.sout();
|
|
|
|
|
|
|
|
return AnimatedContainer(
|
|
|
|
return AnimatedContainer(
|
|
|
|
duration: Duration(milliseconds: 300),
|
|
|
|
duration: mediumDuration,
|
|
|
|
curve: Curves.easeInOut,
|
|
|
|
curve: Curves.easeInOut,
|
|
|
|
width: isOpen ? 200 : 36,
|
|
|
|
width: isOpen ? localManagerPanelWidth : 0,
|
|
|
|
child: OverflowBox(
|
|
|
|
child: OverflowBox(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
maxWidth: 200,
|
|
|
|
maxWidth: localManagerPanelWidth,
|
|
|
|
minWidth: 200,
|
|
|
|
minWidth: localManagerPanelWidth,
|
|
|
|
child: Material(
|
|
|
|
child: Material(
|
|
|
|
color: context.t.backgroundColor,
|
|
|
|
// color: context.t.backgroundColor,
|
|
|
|
elevation: 20,
|
|
|
|
color: Colors.deepPurple,
|
|
|
|
|
|
|
|
elevation: isOpen ? 20 : 0,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
@ -41,7 +42,7 @@ class LocalManager extends StatelessWidget {
|
|
|
|
IconButton(
|
|
|
|
IconButton(
|
|
|
|
onPressed: () => context.read<ContentLayoutProvider>().setProps(localManagerOpened: !isOpen),
|
|
|
|
onPressed: () => context.read<ContentLayoutProvider>().setProps(localManagerOpened: !isOpen),
|
|
|
|
icon: Icon(
|
|
|
|
icon: Icon(
|
|
|
|
isOpen ? CupertinoIcons.chevron_left_2 : CupertinoIcons.chevron_right_2,
|
|
|
|
CupertinoIcons.chevron_left_2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|