mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: fix packages warnings
This commit is contained in:
parent
c19b7cf856
commit
28f39488f4
@ -22,12 +22,13 @@ class KeyboardScreen extends StatefulWidget {
|
|||||||
const KeyboardScreen({Key? key}) : super(key: key);
|
const KeyboardScreen({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_KeyboardScreenState createState() => _KeyboardScreenState();
|
State<KeyboardScreen> createState() => _KeyboardScreenState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _KeyboardScreenState extends State<KeyboardScreen> {
|
class _KeyboardScreenState extends State<KeyboardScreen> {
|
||||||
bool _isKeyboardVisible = false;
|
bool _isKeyboardVisible = false;
|
||||||
final TextEditingController _controller = TextEditingController(text: 'Hello Flowy');
|
final TextEditingController _controller =
|
||||||
|
TextEditingController(text: 'Hello Flowy');
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -14,6 +14,7 @@ dependencies:
|
|||||||
path: ../
|
path: ../
|
||||||
|
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
|
provider:
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -398,8 +398,8 @@ class FlowyOverlayState extends State<FlowyOverlay> {
|
|||||||
|
|
||||||
if (style.blur) {
|
if (style.blur) {
|
||||||
child = BackdropFilter(
|
child = BackdropFilter(
|
||||||
child: child,
|
|
||||||
filter: ImageFilter.blur(sigmaX: 4, sigmaY: 4),
|
filter: ImageFilter.blur(sigmaX: 4, sigmaY: 4),
|
||||||
|
child: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,12 @@ class KeyboardVisibilityDetector extends StatefulWidget {
|
|||||||
final void Function(bool)? onKeyboardVisibilityChange;
|
final void Function(bool)? onKeyboardVisibilityChange;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_KeyboardVisibilityDetectorState createState() => _KeyboardVisibilityDetectorState();
|
State<KeyboardVisibilityDetector> createState() =>
|
||||||
|
_KeyboardVisibilityDetectorState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _KeyboardVisibilityDetectorState extends State<KeyboardVisibilityDetector> {
|
class _KeyboardVisibilityDetectorState
|
||||||
|
extends State<KeyboardVisibilityDetector> {
|
||||||
FlowyInfraUIPlatform get _platform => FlowyInfraUIPlatform.instance;
|
FlowyInfraUIPlatform get _platform => FlowyInfraUIPlatform.instance;
|
||||||
|
|
||||||
bool isObserving = false;
|
bool isObserving = false;
|
||||||
@ -27,7 +29,8 @@ class _KeyboardVisibilityDetectorState extends State<KeyboardVisibilityDetector>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_keyboardSubscription = _platform.onKeyboardVisibilityChange.listen((newValue) {
|
_keyboardSubscription =
|
||||||
|
_platform.onKeyboardVisibilityChange.listen((newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
isKeyboardVisible = newValue;
|
isKeyboardVisible = newValue;
|
||||||
if (widget.onKeyboardVisibilityChange != null) {
|
if (widget.onKeyboardVisibilityChange != null) {
|
||||||
@ -62,7 +65,8 @@ class _KeyboardVisibilityDetectorInheritedWidget extends InheritedWidget {
|
|||||||
final bool isKeyboardVisible;
|
final bool isKeyboardVisible;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool updateShouldNotify(_KeyboardVisibilityDetectorInheritedWidget oldWidget) {
|
bool updateShouldNotify(
|
||||||
|
_KeyboardVisibilityDetectorInheritedWidget oldWidget) {
|
||||||
return isKeyboardVisible != oldWidget.isKeyboardVisible;
|
return isKeyboardVisible != oldWidget.isKeyboardVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@ class FlowyContainer extends StatelessWidget {
|
|||||||
return AnimatedContainer(
|
return AnimatedContainer(
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
child: child,
|
|
||||||
margin: margin,
|
margin: margin,
|
||||||
alignment: align,
|
alignment: align,
|
||||||
duration: duration ?? Durations.medium,
|
duration: duration ?? Durations.medium,
|
||||||
@ -39,6 +38,7 @@ class FlowyContainer extends StatelessWidget {
|
|||||||
color: color,
|
color: color,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
boxShadow: shadows,
|
boxShadow: shadows,
|
||||||
border: border));
|
border: border),
|
||||||
|
child: child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ class _FlowyHoverState extends State<FlowyHover> {
|
|||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Container(child: child, color: widget.style.backgroundColor);
|
return Container(color: widget.style.backgroundColor, child: child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ class FlowyIconButton extends StatelessWidget {
|
|||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: iconPadding,
|
padding: iconPadding,
|
||||||
child: SizedBox.fromSize(child: child, size: childSize),
|
child: SizedBox.fromSize(size: childSize, child: child),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -27,10 +27,12 @@ class StyledSingleChildScrollView extends StatefulWidget {
|
|||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_StyledSingleChildScrollViewState createState() => _StyledSingleChildScrollViewState();
|
State<StyledSingleChildScrollView> createState() =>
|
||||||
|
StyledSingleChildScrollViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _StyledSingleChildScrollViewState extends State<StyledSingleChildScrollView> {
|
class StyledSingleChildScrollViewState
|
||||||
|
extends State<StyledSingleChildScrollView> {
|
||||||
late ScrollController scrollController;
|
late ScrollController scrollController;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -92,10 +94,10 @@ class StyledCustomScrollView extends StatefulWidget {
|
|||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_StyledCustomScrollViewState createState() => _StyledCustomScrollViewState();
|
StyledCustomScrollViewState createState() => StyledCustomScrollViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _StyledCustomScrollViewState extends State<StyledCustomScrollView> {
|
class StyledCustomScrollViewState extends State<StyledCustomScrollView> {
|
||||||
late ScrollController controller;
|
late ScrollController controller;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -45,10 +45,10 @@ class BaseStyledButton extends StatefulWidget {
|
|||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_BaseStyledBtnState createState() => _BaseStyledBtnState();
|
State<BaseStyledButton> createState() => BaseStyledBtnState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BaseStyledBtnState extends State<BaseStyledButton> {
|
class BaseStyledBtnState extends State<BaseStyledButton> {
|
||||||
late FocusNode _focusNode;
|
late FocusNode _focusNode;
|
||||||
bool _isFocused = false;
|
bool _isFocused = false;
|
||||||
|
|
||||||
@ -79,9 +79,16 @@ class _BaseStyledBtnState extends State<BaseStyledButton> {
|
|||||||
borderRadius: widget.borderRadius ?? Corners.s10Border,
|
borderRadius: widget.borderRadius ?? Corners.s10Border,
|
||||||
boxShadow: _isFocused
|
boxShadow: _isFocused
|
||||||
? [
|
? [
|
||||||
BoxShadow(color: theme.shader6, offset: Offset.zero, blurRadius: 8.0, spreadRadius: 0.0),
|
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: widget.bgColor ?? theme.surface, offset: Offset.zero, blurRadius: 8.0, spreadRadius: -4.0),
|
color: theme.shader6,
|
||||||
|
offset: Offset.zero,
|
||||||
|
blurRadius: 8.0,
|
||||||
|
spreadRadius: 0.0),
|
||||||
|
BoxShadow(
|
||||||
|
color: widget.bgColor ?? theme.surface,
|
||||||
|
offset: Offset.zero,
|
||||||
|
blurRadius: 8.0,
|
||||||
|
spreadRadius: -4.0),
|
||||||
]
|
]
|
||||||
: [],
|
: [],
|
||||||
),
|
),
|
||||||
@ -112,20 +119,21 @@ class _BaseStyledBtnState extends State<BaseStyledButton> {
|
|||||||
hoverColor: widget.hoverColor ?? theme.hover,
|
hoverColor: widget.hoverColor ?? theme.hover,
|
||||||
highlightColor: widget.downColor ?? theme.main1,
|
highlightColor: widget.downColor ?? theme.main1,
|
||||||
focusColor: widget.focusColor ?? Colors.grey.withOpacity(0.35),
|
focusColor: widget.focusColor ?? Colors.grey.withOpacity(0.35),
|
||||||
child: Opacity(
|
constraints: BoxConstraints(
|
||||||
child: Padding(
|
minHeight: widget.minHeight ?? 0, minWidth: widget.minWidth ?? 0),
|
||||||
padding: widget.contentPadding ?? EdgeInsets.all(Insets.m),
|
|
||||||
child: widget.child,
|
|
||||||
),
|
|
||||||
opacity: widget.onPressed != null ? 1 : .7,
|
|
||||||
),
|
|
||||||
constraints: BoxConstraints(minHeight: widget.minHeight ?? 0, minWidth: widget.minWidth ?? 0),
|
|
||||||
onPressed: widget.onPressed,
|
onPressed: widget.onPressed,
|
||||||
shape: widget.shape ??
|
shape: widget.shape ??
|
||||||
RoundedRectangleBorder(
|
RoundedRectangleBorder(
|
||||||
side: BorderSide(color: widget.outlineColor, width: 1.5),
|
side: BorderSide(color: widget.outlineColor, width: 1.5),
|
||||||
borderRadius: widget.borderRadius ?? Corners.s10Border,
|
borderRadius: widget.borderRadius ?? Corners.s10Border,
|
||||||
),
|
),
|
||||||
|
child: Opacity(
|
||||||
|
opacity: widget.onPressed != null ? 1 : .7,
|
||||||
|
child: Padding(
|
||||||
|
padding: widget.contentPadding ?? EdgeInsets.all(Insets.m),
|
||||||
|
child: widget.child,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,8 @@ class PrimaryButton extends StatelessWidget {
|
|||||||
hoverColor: theme.main1,
|
hoverColor: theme.main1,
|
||||||
downColor: theme.main1,
|
downColor: theme.main1,
|
||||||
borderRadius: bigMode ? Corners.s12Border : Corners.s8Border,
|
borderRadius: bigMode ? Corners.s12Border : Corners.s8Border,
|
||||||
child: child,
|
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
|
child: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,8 @@ class SecondaryButton extends StatelessWidget {
|
|||||||
downColor: theme.main1,
|
downColor: theme.main1,
|
||||||
outlineColor: theme.main1,
|
outlineColor: theme.main1,
|
||||||
borderRadius: bigMode ? Corners.s12Border : Corners.s8Border,
|
borderRadius: bigMode ? Corners.s12Border : Corners.s8Border,
|
||||||
child: child,
|
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
|
child: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,9 +151,9 @@ class StyledDialogRoute<T> extends PopupRoute<T> {
|
|||||||
Widget buildPage(BuildContext context, Animation<double> animation,
|
Widget buildPage(BuildContext context, Animation<double> animation,
|
||||||
Animation<double> secondaryAnimation) {
|
Animation<double> secondaryAnimation) {
|
||||||
return Semantics(
|
return Semantics(
|
||||||
child: _pageBuilder(context, animation, secondaryAnimation),
|
|
||||||
scopesRoute: true,
|
scopesRoute: true,
|
||||||
explicitChildNodes: true,
|
explicitChildNodes: true,
|
||||||
|
child: _pageBuilder(context, animation, secondaryAnimation),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,12 +5,14 @@ typedef HoverBuilder = Widget Function(BuildContext context, bool onHover);
|
|||||||
class MouseHoverBuilder extends StatefulWidget {
|
class MouseHoverBuilder extends StatefulWidget {
|
||||||
final bool isClickable;
|
final bool isClickable;
|
||||||
|
|
||||||
const MouseHoverBuilder({Key? key, required this.builder, this.isClickable = false}) : super(key: key);
|
const MouseHoverBuilder(
|
||||||
|
{Key? key, required this.builder, this.isClickable = false})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
final HoverBuilder builder;
|
final HoverBuilder builder;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_MouseHoverBuilderState createState() => _MouseHoverBuilderState();
|
State<MouseHoverBuilder> createState() => _MouseHoverBuilderState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MouseHoverBuilderState extends State<MouseHoverBuilder> {
|
class _MouseHoverBuilderState extends State<MouseHoverBuilder> {
|
||||||
@ -19,7 +21,9 @@ class _MouseHoverBuilderState extends State<MouseHoverBuilder> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MouseRegion(
|
return MouseRegion(
|
||||||
cursor: widget.isClickable ? SystemMouseCursors.click : SystemMouseCursors.basic,
|
cursor: widget.isClickable
|
||||||
|
? SystemMouseCursors.click
|
||||||
|
: SystemMouseCursors.basic,
|
||||||
onEnter: (p) => setOnHover(true),
|
onEnter: (p) => setOnHover(true),
|
||||||
onExit: (p) => setOnHover(false),
|
onExit: (p) => setOnHover(false),
|
||||||
child: widget.builder(context, _onHover),
|
child: widget.builder(context, _onHover),
|
||||||
|
@ -42,11 +42,11 @@ class RoundedTextButton extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: SizedBox.expand(
|
child: SizedBox.expand(
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
|
onPressed: onPressed,
|
||||||
child: Text(
|
child: Text(
|
||||||
title ?? '',
|
title ?? '',
|
||||||
style: TextStyle(color: textColor, fontSize: fontSize),
|
style: TextStyle(color: textColor, fontSize: fontSize),
|
||||||
),
|
),
|
||||||
onPressed: onPressed,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -52,10 +52,10 @@ class PageRoutes {
|
|||||||
pageBuilder: (context, animation, secondaryAnimation) => pageBuilder(),
|
pageBuilder: (context, animation, secondaryAnimation) => pageBuilder(),
|
||||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||||
return SharedAxisTransition(
|
return SharedAxisTransition(
|
||||||
child: child,
|
|
||||||
animation: animation,
|
animation: animation,
|
||||||
secondaryAnimation: secondaryAnimation,
|
secondaryAnimation: secondaryAnimation,
|
||||||
transitionType: type,
|
transitionType: type,
|
||||||
|
child: child,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -31,13 +31,13 @@ class SeparatedColumn extends StatelessWidget {
|
|||||||
if (i > 0 && separatorBuilder != null) c.insert(i, separatorBuilder!());
|
if (i > 0 && separatorBuilder != null) c.insert(i, separatorBuilder!());
|
||||||
}
|
}
|
||||||
return Column(
|
return Column(
|
||||||
children: c,
|
|
||||||
mainAxisAlignment: mainAxisAlignment,
|
mainAxisAlignment: mainAxisAlignment,
|
||||||
crossAxisAlignment: crossAxisAlignment,
|
crossAxisAlignment: crossAxisAlignment,
|
||||||
mainAxisSize: mainAxisSize,
|
mainAxisSize: mainAxisSize,
|
||||||
textBaseline: textBaseline,
|
textBaseline: textBaseline,
|
||||||
textDirection: textDirection,
|
textDirection: textDirection,
|
||||||
verticalDirection: verticalDirection,
|
verticalDirection: verticalDirection,
|
||||||
|
children: c,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ dependencies:
|
|||||||
equatable: "^2.0.3"
|
equatable: "^2.0.3"
|
||||||
animations: ^2.0.0
|
animations: ^2.0.0
|
||||||
loading_indicator: ^3.0.1
|
loading_indicator: ^3.0.1
|
||||||
|
async:
|
||||||
|
|
||||||
# Federated Platform Interface
|
# Federated Platform Interface
|
||||||
flowy_infra_ui_platform_interface:
|
flowy_infra_ui_platform_interface:
|
||||||
|
Loading…
Reference in New Issue
Block a user