diff --git a/lib/app.dart b/lib/app.dart index aa48084..9c224fe 100755 --- a/lib/app.dart +++ b/lib/app.dart @@ -39,7 +39,7 @@ class _IsekaiWikiAppWrapperState extends State { statusBarBrightness: Brightness.dark, statusBarIconBrightness: Brightness.light, systemStatusBarContrastEnforced: false, - systemNavigationBarColor: Colors.transparent.withAlpha(1), + systemNavigationBarColor: Colors.black.withAlpha(1), systemNavigationBarContrastEnforced: false, systemNavigationBarIconBrightness: Brightness.dark, ), diff --git a/lib/components/isekai_nav_bar.dart b/lib/components/isekai_nav_bar.dart index 171f5dc..9e99050 100755 --- a/lib/components/isekai_nav_bar.dart +++ b/lib/components/isekai_nav_bar.dart @@ -52,8 +52,7 @@ class _HeroTag { // Let the Hero tag be described in tree dumps. @override - String toString() => - 'Default Hero tag for Cupertino navigation bars with navigator $navigator'; + String toString() => 'Default Hero tag for Cupertino navigation bars with navigator $navigator'; @override bool operator ==(Object other) { @@ -130,9 +129,8 @@ Widget _wrapWithBackground({ Widget result = child; if (updateSystemUiOverlay) { final bool isDark = backgroundColor.computeLuminance() < 0.179; - final Brightness newBrightness = - brightness ?? (isDark ? Brightness.dark : Brightness.light); - final SystemUiOverlayStyle overlayStyle; + final Brightness newBrightness = brightness ?? (isDark ? Brightness.dark : Brightness.light); + SystemUiOverlayStyle overlayStyle; switch (newBrightness) { case Brightness.dark: overlayStyle = SystemUiOverlayStyle.light; @@ -141,6 +139,12 @@ Widget _wrapWithBackground({ overlayStyle = SystemUiOverlayStyle.dark; break; } + overlayStyle = overlayStyle.copyWith( + systemStatusBarContrastEnforced: false, + systemNavigationBarColor: CupertinoColors.black.withAlpha(1), + systemNavigationBarContrastEnforced: false, + systemNavigationBarIconBrightness: Brightness.dark, + ); result = AnnotatedRegion( value: overlayStyle, child: result, @@ -233,8 +237,7 @@ bool _isTransitionable(BuildContext context) { /// * [IsekaiSliverNavigationBar] for a navigation bar to be placed in a /// scrolling list and that supports iOS-11-style large titles. /// * -class IsekaiNavigationBar extends StatefulWidget - implements ObstructingPreferredSizeWidget { +class IsekaiNavigationBar extends StatefulWidget implements ObstructingPreferredSizeWidget { /// Creates a navigation bar in the iOS style. const IsekaiNavigationBar({ super.key, @@ -447,8 +450,7 @@ class _IsekaiNavigationBarState extends State { CupertinoDynamicColor.maybeResolve(widget.backgroundColor, context) ?? CupertinoTheme.of(context).barBackgroundColor; - final _NavigationBarStaticComponents components = - _NavigationBarStaticComponents( + final _NavigationBarStaticComponents components = _NavigationBarStaticComponents( keys: keys, route: ModalRoute.of(context), userLeading: widget.leading, @@ -484,9 +486,7 @@ class _IsekaiNavigationBarState extends State { // Get the context that might have a possibly changed CupertinoTheme. builder: (BuildContext context) { return Hero( - tag: widget.heroTag == _defaultHeroTag - ? _HeroTag(Navigator.of(context)) - : widget.heroTag, + tag: widget.heroTag == _defaultHeroTag ? _HeroTag(Navigator.of(context)) : widget.heroTag, createRectTween: _linearTranslateWithLargestRectSizeTween, placeholderBuilder: _navBarHeroLaunchPadBuilder, flightShuttleBuilder: _navBarHeroFlightShuttleBuilder, @@ -494,10 +494,8 @@ class _IsekaiNavigationBarState extends State { child: _TransitionableNavigationBar( componentsKeys: keys, backgroundColor: backgroundColor, - backButtonTextStyle: - CupertinoTheme.of(context).textTheme.navActionTextStyle, - titleTextStyle: - CupertinoTheme.of(context).textTheme.navTitleTextStyle, + backButtonTextStyle: CupertinoTheme.of(context).textTheme.navActionTextStyle, + titleTextStyle: CupertinoTheme.of(context).textTheme.navTitleTextStyle, largeTitleTextStyle: null, border: widget.border, hasUserMiddle: widget.middle != null, @@ -696,8 +694,7 @@ class IsekaiSliverNavigationBar extends StatefulWidget { final bool stretch; @override - State createState() => - _IsekaiSliverNavigationBarState(); + State createState() => _IsekaiSliverNavigationBarState(); } // A state class exists for the nav bar so that the keys of its sub-components @@ -714,8 +711,7 @@ class _IsekaiSliverNavigationBarState extends State { @override Widget build(BuildContext context) { - final _NavigationBarStaticComponents components = - _NavigationBarStaticComponents( + final _NavigationBarStaticComponents components = _NavigationBarStaticComponents( keys: keys, route: ModalRoute.of(context), userLeading: widget.leading, @@ -736,8 +732,7 @@ class _IsekaiSliverNavigationBarState extends State { keys: keys, components: components, userMiddle: widget.middle, - backgroundColor: CupertinoDynamicColor.maybeResolve( - widget.backgroundColor, context) ?? + backgroundColor: CupertinoDynamicColor.maybeResolve(widget.backgroundColor, context) ?? CupertinoTheme.of(context).barBackgroundColor, brightness: widget.brightness, border: widget.border, @@ -745,18 +740,17 @@ class _IsekaiSliverNavigationBarState extends State { actionsForegroundColor: CupertinoTheme.of(context).primaryColor, transitionBetweenRoutes: widget.transitionBetweenRoutes, heroTag: widget.heroTag, - persistentHeight: (_kNavBarPersistentHeight * scaleFactor) + - MediaQuery.of(context).padding.top, + persistentHeight: + (_kNavBarPersistentHeight * scaleFactor) + MediaQuery.of(context).padding.top, alwaysShowMiddle: widget.middle != null, - stretchConfiguration: - widget.stretch ? OverScrollHeaderStretchConfiguration() : null, + stretchConfiguration: widget.stretch ? OverScrollHeaderStretchConfiguration() : null, ), ); } } -class _LargeTitleNavigationBarSliverDelegate - extends SliverPersistentHeaderDelegate with DiagnosticableTreeMixin { +class _LargeTitleNavigationBarSliverDelegate extends SliverPersistentHeaderDelegate + with DiagnosticableTreeMixin { _LargeTitleNavigationBarSliverDelegate({ required this.keys, required this.components, @@ -794,20 +788,17 @@ class _LargeTitleNavigationBarSliverDelegate @override double get maxExtent => persistentHeight + - (_kNavBarLargeTitleHeightExtension * - MediaQuery.of(Get.context!).textScaleFactor); + (_kNavBarLargeTitleHeightExtension * MediaQuery.of(Get.context!).textScaleFactor); @override OverScrollHeaderStretchConfiguration? stretchConfiguration; @override - Widget build( - BuildContext context, double shrinkOffset, bool overlapsContent) { + Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { final bool showLargeTitle = shrinkOffset < maxExtent - minExtent - _kNavBarShowLargeTitleThreshold; - final _PersistentNavigationBar persistentNavigationBar = - _PersistentNavigationBar( + final _PersistentNavigationBar persistentNavigationBar = _PersistentNavigationBar( components: components, padding: padding, // If a user specified middle exists, always show it. Otherwise, show @@ -851,9 +842,7 @@ class _LargeTitleNavigationBarSliverDelegate child: Semantics( header: true, child: DefaultTextStyle( - style: CupertinoTheme.of(context) - .textTheme - .navLargeTitleTextStyle, + style: CupertinoTheme.of(context).textTheme.navLargeTitleTextStyle, maxLines: 1, overflow: TextOverflow.ellipsis, child: components.largeTitle!, @@ -881,9 +870,7 @@ class _LargeTitleNavigationBarSliverDelegate } return Hero( - tag: heroTag == _defaultHeroTag - ? _HeroTag(Navigator.of(context)) - : heroTag, + tag: heroTag == _defaultHeroTag ? _HeroTag(Navigator.of(context)) : heroTag, createRectTween: _linearTranslateWithLargestRectSizeTween, flightShuttleBuilder: _navBarHeroFlightShuttleBuilder, placeholderBuilder: _navBarHeroLaunchPadBuilder, @@ -893,13 +880,10 @@ class _LargeTitleNavigationBarSliverDelegate // needs to wrap the top level RenderBox rather than a RenderSliver. child: _TransitionableNavigationBar( componentsKeys: keys, - backgroundColor: - CupertinoDynamicColor.resolve(backgroundColor, context), - backButtonTextStyle: - CupertinoTheme.of(context).textTheme.navActionTextStyle, + backgroundColor: CupertinoDynamicColor.resolve(backgroundColor, context), + backButtonTextStyle: CupertinoTheme.of(context).textTheme.navActionTextStyle, titleTextStyle: CupertinoTheme.of(context).textTheme.navTitleTextStyle, - largeTitleTextStyle: - CupertinoTheme.of(context).textTheme.navLargeTitleTextStyle, + largeTitleTextStyle: CupertinoTheme.of(context).textTheme.navLargeTitleTextStyle, border: border, hasUserMiddle: userMiddle != null, largeExpanded: showLargeTitle, @@ -994,8 +978,7 @@ class _PersistentNavigationBar extends StatelessWidget { double scaleFactor = MediaQuery.of(context).textScaleFactor; return SizedBox( - height: (_kNavBarPersistentHeight * scaleFactor) + - MediaQuery.of(context).padding.top, + height: (_kNavBarPersistentHeight * scaleFactor) + MediaQuery.of(context).padding.top, child: SafeArea( bottom: false, child: paddedToolbar, @@ -1354,11 +1337,10 @@ class IsekaiNavigationBarBackButton extends StatelessWidget { ); } - TextStyle actionTextStyle = - CupertinoTheme.of(context).textTheme.navActionTextStyle; + TextStyle actionTextStyle = CupertinoTheme.of(context).textTheme.navActionTextStyle; if (color != null) { - actionTextStyle = actionTextStyle.copyWith( - color: CupertinoDynamicColor.maybeResolve(color, context)); + actionTextStyle = + actionTextStyle.copyWith(color: CupertinoDynamicColor.maybeResolve(color, context)); } return CupertinoButton( @@ -1371,8 +1353,7 @@ class IsekaiNavigationBarBackButton extends StatelessWidget { child: DefaultTextStyle( style: actionTextStyle, child: ConstrainedBox( - constraints: - const BoxConstraints(minWidth: _kNavBarBackButtonTapWidth), + constraints: const BoxConstraints(minWidth: _kNavBarBackButtonTapWidth), child: Row( mainAxisSize: MainAxisSize.min, children: [ @@ -1457,8 +1438,7 @@ class _BackLabel extends StatelessWidget { // `child` is never passed in into ValueListenableBuilder so it's always // null here and unused. - Widget _buildPreviousTitleWidget( - BuildContext context, String? previousTitle, Widget? child) { + Widget _buildPreviousTitleWidget(BuildContext context, String? previousTitle, Widget? child) { previousTitle ??= "返回"; Text textWidget = Text( @@ -1482,8 +1462,7 @@ class _BackLabel extends StatelessWidget { Widget build(BuildContext context) { if (specifiedPreviousTitle != null) { return _buildPreviousTitleWidget(context, specifiedPreviousTitle, null); - } else if (route is CupertinoRouteTransitionMixin && - !route!.isFirst) { + } else if (route is CupertinoRouteTransitionMixin && !route!.isFirst) { final CupertinoRouteTransitionMixin cupertinoRoute = route! as CupertinoRouteTransitionMixin; // There is no timing issue because the previousTitle Listenable changes @@ -1534,8 +1513,8 @@ class _TransitionableNavigationBar extends StatelessWidget { final Widget child; RenderBox get renderBox { - final RenderBox box = componentsKeys.navBarBoxKey.currentContext! - .findRenderObject()! as RenderBox; + final RenderBox box = + componentsKeys.navBarBoxKey.currentContext!.findRenderObject()! as RenderBox; assert( box.attached, '_TransitionableNavigationBar.renderBox should be called when building ' @@ -1645,31 +1624,19 @@ class _NavigationBarTransition extends StatelessWidget { }, ), // Draw all the components on top of the empty bar box. - if (componentsTransition.bottomBackChevron != null) - componentsTransition.bottomBackChevron!, - if (componentsTransition.bottomBackLabel != null) - componentsTransition.bottomBackLabel!, - if (componentsTransition.bottomLeading != null) - componentsTransition.bottomLeading!, - if (componentsTransition.bottomMiddle != null) - componentsTransition.bottomMiddle!, - if (componentsTransition.bottomLargeTitle != null) - componentsTransition.bottomLargeTitle!, - if (componentsTransition.bottomTrailing != null) - componentsTransition.bottomTrailing!, + if (componentsTransition.bottomBackChevron != null) componentsTransition.bottomBackChevron!, + if (componentsTransition.bottomBackLabel != null) componentsTransition.bottomBackLabel!, + if (componentsTransition.bottomLeading != null) componentsTransition.bottomLeading!, + if (componentsTransition.bottomMiddle != null) componentsTransition.bottomMiddle!, + if (componentsTransition.bottomLargeTitle != null) componentsTransition.bottomLargeTitle!, + if (componentsTransition.bottomTrailing != null) componentsTransition.bottomTrailing!, // Draw top components on top of the bottom components. - if (componentsTransition.topLeading != null) - componentsTransition.topLeading!, - if (componentsTransition.topBackChevron != null) - componentsTransition.topBackChevron!, - if (componentsTransition.topBackLabel != null) - componentsTransition.topBackLabel!, - if (componentsTransition.topMiddle != null) - componentsTransition.topMiddle!, - if (componentsTransition.topLargeTitle != null) - componentsTransition.topLargeTitle!, - if (componentsTransition.topTrailing != null) - componentsTransition.topTrailing!, + if (componentsTransition.topLeading != null) componentsTransition.topLeading!, + if (componentsTransition.topBackChevron != null) componentsTransition.topBackChevron!, + if (componentsTransition.topBackLabel != null) componentsTransition.topBackLabel!, + if (componentsTransition.topMiddle != null) componentsTransition.topMiddle!, + if (componentsTransition.topLargeTitle != null) componentsTransition.topLargeTitle!, + if (componentsTransition.topTrailing != null) componentsTransition.topTrailing!, ]; // The actual outer box is big enough to contain both the bottom and top @@ -1677,8 +1644,7 @@ class _NavigationBarTransition extends StatelessWidget { // can actually be outside the linearly lerp'ed Rect in the middle of // the animation, such as the topLargeTitle. return SizedBox( - height: math.max(heightTween.begin!, heightTween.end!) + - MediaQuery.of(context).padding.top, + height: math.max(heightTween.begin!, heightTween.end!) + MediaQuery.of(context).padding.top, width: double.infinity, child: Stack( children: children, @@ -1731,8 +1697,7 @@ class _NavigationBarComponentsTransition { topLargeExpanded = topNavBar.largeExpanded, transitionBox = // paintBounds are based on offset zero so it's ok to expand the Rects. - bottomNavBar.renderBox.paintBounds - .expandToInclude(topNavBar.renderBox.paintBounds), + bottomNavBar.renderBox.paintBounds.expandToInclude(topNavBar.renderBox.paintBounds), forwardDirection = directionality == TextDirection.ltr ? 1.0 : -1.0; static final Animatable fadeOut = Tween( @@ -1779,13 +1744,11 @@ class _NavigationBarComponentsTransition { GlobalKey key, { required RenderBox from, }) { - final RenderBox componentBox = - key.currentContext!.findRenderObject()! as RenderBox; + final RenderBox componentBox = key.currentContext!.findRenderObject()! as RenderBox; assert(componentBox.attached); return RelativeRect.fromRect( - componentBox.localToGlobal(Offset.zero, ancestor: from) & - componentBox.size, + componentBox.localToGlobal(Offset.zero, ancestor: from) & componentBox.size, transitionBox, ); } @@ -1810,10 +1773,8 @@ class _NavigationBarComponentsTransition { required RenderBox toNavBarBox, required Widget child, }) { - final RenderBox fromBox = - fromKey.currentContext!.findRenderObject()! as RenderBox; - final RenderBox toBox = - toKey.currentContext!.findRenderObject()! as RenderBox; + final RenderBox fromBox = fromKey.currentContext!.findRenderObject()! as RenderBox; + final RenderBox toBox = toKey.currentContext!.findRenderObject()! as RenderBox; final bool isLTR = forwardDirection > 0; @@ -1829,8 +1790,7 @@ class _NavigationBarComponentsTransition { ); final Offset fromAnchorInFromBox = fromBox.localToGlobal(fromAnchorLocal, ancestor: fromNavBarBox); - final Offset toAnchorInToBox = - toBox.localToGlobal(toAnchorLocal, ancestor: toNavBarBox); + final Offset toAnchorInToBox = toBox.localToGlobal(toAnchorLocal, ancestor: toNavBarBox); // We can't get ahold of the render box of the stack (i.e., `transitionBox`) // we place components on yet, but we know the stack needs to be top-leading @@ -1842,13 +1802,10 @@ class _NavigationBarComponentsTransition { // coordinates. final Offset translation = isLTR ? toAnchorInToBox - fromAnchorInFromBox - : Offset(toNavBarBox.size.width - toAnchorInToBox.dx, - toAnchorInToBox.dy) - - Offset(fromNavBarBox.size.width - fromAnchorInFromBox.dx, - fromAnchorInFromBox.dy); + : Offset(toNavBarBox.size.width - toAnchorInToBox.dx, toAnchorInToBox.dy) - + Offset(fromNavBarBox.size.width - fromAnchorInFromBox.dx, fromAnchorInFromBox.dy); - final RelativeRect fromBoxMargin = - positionInTransitionBox(fromKey, from: fromNavBarBox); + final RelativeRect fromBoxMargin = positionInTransitionBox(fromKey, from: fromNavBarBox); final Offset fromOriginInTransitionBox = Offset( isLTR ? fromBoxMargin.left : fromBoxMargin.right, fromBoxMargin.top, @@ -1880,16 +1837,14 @@ class _NavigationBarComponentsTransition { } Widget? get bottomLeading { - final KeyedSubtree? bottomLeading = - bottomComponents.leadingKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? bottomLeading = bottomComponents.leadingKey.currentWidget as KeyedSubtree?; if (bottomLeading == null) { return null; } return Positioned.fromRelativeRect( - rect: positionInTransitionBox(bottomComponents.leadingKey, - from: bottomNavBarBox), + rect: positionInTransitionBox(bottomComponents.leadingKey, from: bottomNavBarBox), child: FadeTransition( opacity: fadeOutBy(0.4), child: bottomLeading.child, @@ -1906,8 +1861,7 @@ class _NavigationBarComponentsTransition { } return Positioned.fromRelativeRect( - rect: positionInTransitionBox(bottomComponents.backChevronKey, - from: bottomNavBarBox), + rect: positionInTransitionBox(bottomComponents.backChevronKey, from: bottomNavBarBox), child: FadeTransition( opacity: fadeOutBy(0.6), child: DefaultTextStyle( @@ -1926,9 +1880,8 @@ class _NavigationBarComponentsTransition { return null; } - final RelativeRect from = positionInTransitionBox( - bottomComponents.backLabelKey, - from: bottomNavBarBox); + final RelativeRect from = + positionInTransitionBox(bottomComponents.backLabelKey, from: bottomNavBarBox); // Transition away by sliding horizontally to the leading edge off of the screen. final RelativeRectTween positionTween = RelativeRectTween( @@ -1954,12 +1907,9 @@ class _NavigationBarComponentsTransition { } Widget? get bottomMiddle { - final KeyedSubtree? bottomMiddle = - bottomComponents.middleKey.currentWidget as KeyedSubtree?; - final KeyedSubtree? topBackLabel = - topComponents.backLabelKey.currentWidget as KeyedSubtree?; - final KeyedSubtree? topLeading = - topComponents.leadingKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? bottomMiddle = bottomComponents.middleKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topBackLabel = topComponents.backLabelKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topLeading = topComponents.leadingKey.currentWidget as KeyedSubtree?; // The middle component is non-null when the nav bar is a large title // nav bar but would be invisible when expanded, therefore don't show it here. @@ -1998,8 +1948,7 @@ class _NavigationBarComponentsTransition { // fade. if (bottomMiddle != null && topLeading != null) { return Positioned.fromRelativeRect( - rect: positionInTransitionBox(bottomComponents.middleKey, - from: bottomNavBarBox), + rect: positionInTransitionBox(bottomComponents.middleKey, from: bottomNavBarBox), child: FadeTransition( opacity: fadeOutBy(bottomHasUserMiddle ? 0.4 : 0.7), // Keep the font when transitioning into a non-back label leading. @@ -2017,10 +1966,8 @@ class _NavigationBarComponentsTransition { Widget? get bottomLargeTitle { final KeyedSubtree? bottomLargeTitle = bottomComponents.largeTitleKey.currentWidget as KeyedSubtree?; - final KeyedSubtree? topBackLabel = - topComponents.backLabelKey.currentWidget as KeyedSubtree?; - final KeyedSubtree? topLeading = - topComponents.leadingKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topBackLabel = topComponents.backLabelKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topLeading = topComponents.leadingKey.currentWidget as KeyedSubtree?; if (bottomLargeTitle == null || !bottomLargeExpanded) { return null; @@ -2056,9 +2003,8 @@ class _NavigationBarComponentsTransition { if (bottomLargeTitle != null && topLeading != null) { // Unlike bottom middle, the bottom large title moves when it can't // transition to the top back label position. - final RelativeRect from = positionInTransitionBox( - bottomComponents.largeTitleKey, - from: bottomNavBarBox); + final RelativeRect from = + positionInTransitionBox(bottomComponents.largeTitleKey, from: bottomNavBarBox); final RelativeRectTween positionTween = RelativeRectTween( begin: from, @@ -2097,8 +2043,7 @@ class _NavigationBarComponentsTransition { } return Positioned.fromRelativeRect( - rect: positionInTransitionBox(bottomComponents.trailingKey, - from: bottomNavBarBox), + rect: positionInTransitionBox(bottomComponents.trailingKey, from: bottomNavBarBox), child: FadeTransition( opacity: fadeOutBy(0.6), child: bottomTrailing.child, @@ -2107,16 +2052,14 @@ class _NavigationBarComponentsTransition { } Widget? get topLeading { - final KeyedSubtree? topLeading = - topComponents.leadingKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topLeading = topComponents.leadingKey.currentWidget as KeyedSubtree?; if (topLeading == null) { return null; } return Positioned.fromRelativeRect( - rect: - positionInTransitionBox(topComponents.leadingKey, from: topNavBarBox), + rect: positionInTransitionBox(topComponents.leadingKey, from: topNavBarBox), child: FadeTransition( opacity: fadeInFrom(0.6), child: topLeading.child, @@ -2134,17 +2077,15 @@ class _NavigationBarComponentsTransition { return null; } - final RelativeRect to = positionInTransitionBox( - topComponents.backChevronKey, - from: topNavBarBox); + final RelativeRect to = + positionInTransitionBox(topComponents.backChevronKey, from: topNavBarBox); RelativeRect from = to; // If it's the first page with a back chevron, shift in slightly from the // right. if (bottomBackChevron == null) { final RenderBox topBackChevronBox = - topComponents.backChevronKey.currentContext!.findRenderObject()! - as RenderBox; + topComponents.backChevronKey.currentContext!.findRenderObject()! as RenderBox; from = to.shift( Offset( forwardDirection * topBackChevronBox.size.width * 2.0, @@ -2171,24 +2112,20 @@ class _NavigationBarComponentsTransition { } Widget? get topBackLabel { - final KeyedSubtree? bottomMiddle = - bottomComponents.middleKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? bottomMiddle = bottomComponents.middleKey.currentWidget as KeyedSubtree?; final KeyedSubtree? bottomLargeTitle = bottomComponents.largeTitleKey.currentWidget as KeyedSubtree?; - final KeyedSubtree? topBackLabel = - topComponents.backLabelKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topBackLabel = topComponents.backLabelKey.currentWidget as KeyedSubtree?; if (topBackLabel == null) { return null; } - final RenderAnimatedOpacity? topBackLabelOpacity = topComponents - .backLabelKey.currentContext + final RenderAnimatedOpacity? topBackLabelOpacity = topComponents.backLabelKey.currentContext ?.findAncestorRenderObjectOfType(); Animation? midClickOpacity; - if (topBackLabelOpacity != null && - topBackLabelOpacity.opacity.value < 1.0) { + if (topBackLabelOpacity != null && topBackLabelOpacity.opacity.value < 1.0) { midClickOpacity = animation.drive(Tween( begin: 0.0, end: topBackLabelOpacity.opacity.value, @@ -2200,9 +2137,7 @@ class _NavigationBarComponentsTransition { // content text might be different. For instance, if the bottomLargeTitle // text is too long, the topBackLabel will say 'Back' instead of the original // text. - if (bottomLargeTitle != null && - topBackLabel != null && - bottomLargeExpanded) { + if (bottomLargeTitle != null && topBackLabel != null && bottomLargeExpanded) { return slideFromLeadingEdge( fromKey: bottomComponents.largeTitleKey, fromNavBarBox: bottomNavBarBox, @@ -2248,8 +2183,7 @@ class _NavigationBarComponentsTransition { } Widget? get topMiddle { - final KeyedSubtree? topMiddle = - topComponents.middleKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topMiddle = topComponents.middleKey.currentWidget as KeyedSubtree?; if (topMiddle == null) { return null; @@ -2261,10 +2195,9 @@ class _NavigationBarComponentsTransition { return null; } - final RelativeRect to = - positionInTransitionBox(topComponents.middleKey, from: topNavBarBox); - final RenderBox toBox = topComponents.middleKey.currentContext! - .findRenderObject()! as RenderBox; + final RelativeRect to = positionInTransitionBox(topComponents.middleKey, from: topNavBarBox); + final RenderBox toBox = + topComponents.middleKey.currentContext!.findRenderObject()! as RenderBox; final bool isLTR = forwardDirection > 0; @@ -2301,16 +2234,14 @@ class _NavigationBarComponentsTransition { } Widget? get topTrailing { - final KeyedSubtree? topTrailing = - topComponents.trailingKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topTrailing = topComponents.trailingKey.currentWidget as KeyedSubtree?; if (topTrailing == null) { return null; } return Positioned.fromRelativeRect( - rect: positionInTransitionBox(topComponents.trailingKey, - from: topNavBarBox), + rect: positionInTransitionBox(topComponents.trailingKey, from: topNavBarBox), child: FadeTransition( opacity: fadeInFrom(0.4), child: topTrailing.child, @@ -2319,15 +2250,14 @@ class _NavigationBarComponentsTransition { } Widget? get topLargeTitle { - final KeyedSubtree? topLargeTitle = - topComponents.largeTitleKey.currentWidget as KeyedSubtree?; + final KeyedSubtree? topLargeTitle = topComponents.largeTitleKey.currentWidget as KeyedSubtree?; if (topLargeTitle == null || !topLargeExpanded) { return null; } - final RelativeRect to = positionInTransitionBox(topComponents.largeTitleKey, - from: topNavBarBox); + final RelativeRect to = + positionInTransitionBox(topComponents.largeTitleKey, from: topNavBarBox); // Shift in from the trailing edge of the screen. final RelativeRectTween positionTween = RelativeRectTween( @@ -2417,8 +2347,7 @@ Widget _navBarHeroFlightShuttleBuilder( final _TransitionableNavigationBar fromNavBar = fromHeroWidget.child as _TransitionableNavigationBar; - final _TransitionableNavigationBar toNavBar = - toHeroWidget.child as _TransitionableNavigationBar; + final _TransitionableNavigationBar toNavBar = toHeroWidget.child as _TransitionableNavigationBar; assert(fromNavBar.componentsKeys != null); assert(toNavBar.componentsKeys != null); diff --git a/lib/components/toc.dart b/lib/components/toc.dart index aaf195f..40c7f07 100644 --- a/lib/components/toc.dart +++ b/lib/components/toc.dart @@ -1,10 +1,14 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; +import 'package:flutter/foundation.dart'; import 'package:isekai_wiki/api/response/parse.dart'; import 'package:isekai_wiki/components/gesture_detector.dart'; import 'package:isekai_wiki/components/safearea_builder.dart'; import 'package:isekai_wiki/styles.dart'; -import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; + +class TOCStyles { + static const double listPadding = 2; + static const activeColor = Color.fromRGBO(51, 102, 204, 1); +} class TOCList extends StatefulWidget { final String activedItem; @@ -27,13 +31,16 @@ class TOCList extends StatefulWidget { class _TOCListState extends State { String _activedItem = ""; String _lastSelectedItem = ""; - final ItemScrollController _itemScrollController = ItemScrollController(); + double _listPaddingTop = 0; + double _listPaddingBottom = 0; + + final ScrollController _scrollController = ScrollController(); @override void didUpdateWidget(covariant TOCList oldWidget) { super.didUpdateWidget(oldWidget); - if (_activedItem != widget.activedItem && _activedItem != _lastSelectedItem) { + if (_activedItem != widget.activedItem) { _activedItem = widget.activedItem; // Scroll to current item int activedIndex; @@ -48,7 +55,29 @@ class _TOCListState extends State { activedIndex = 0; } } - _itemScrollController.jumpTo(index: activedIndex); + scrollToTOCItem(activedIndex); + } + } + + void scrollToTOCItem(int index) { + var listLength = widget.sections.length + (widget.hasFirstSection ? 1 : 0); + var scrollInnerOffsetHeight = + _scrollController.position.maxScrollExtent + _scrollController.position.viewportDimension; + var scrollInnerHeight = scrollInnerOffsetHeight - _listPaddingTop - _listPaddingBottom; + + var itemHeight = scrollInnerHeight / listLength; + var target = itemHeight * index; + + var scrollTop = _scrollController.position.pixels; + var scrollOffsetBottom = scrollTop + + _scrollController.position.viewportDimension - + _listPaddingTop - + _listPaddingBottom - + itemHeight; + + if (target < scrollTop || target > scrollOffsetBottom) { + _scrollController.jumpTo(clampDouble(target, _scrollController.position.minScrollExtent, + _scrollController.position.maxScrollExtent)); } } @@ -61,50 +90,58 @@ class _TOCListState extends State { Widget build(BuildContext context) { final itemCount = widget.hasFirstSection ? widget.sections.length + 1 : widget.sections.length; + List tocItemList = []; + if (widget.hasFirstSection) { + // 创建首项 + tocItemList.add( + TOCItem( + text: "简介", + anchor: "_firstSection", + active: widget.activedItem == "_firstSection", + onPressed: handleTOCItemPressed, + ), + ); + } + + for (var index = 0; index < widget.sections.length; index++) { + var section = widget.sections[index]; + var isTopItem = !widget.hasFirstSection && index == 0; + tocItemList.add( + Container( + decoration: BoxDecoration( + border: Border( + top: isTopItem + ? BorderSide.none + : const BorderSide(color: Color.fromRGBO(234, 236, 240, 1))), + ), + child: TOCItem( + text: section.line, + number: section.number, + anchor: section.anchor, + active: widget.activedItem == section.anchor, + onPressed: handleTOCItemPressed, + ), + ), + ); + } + return DefaultTextStyle( style: CupertinoTheme.of(context).textTheme.textStyle, child: Container( color: Styles.themePageBackgroundColor, - child: SafeAreaBuilder( - builder: (context, padding) => ScrollablePositionedList.builder( - itemScrollController: _itemScrollController, + child: SafeAreaBuilder(builder: (context, padding) { + _listPaddingTop = padding.top + TOCStyles.listPadding; + _listPaddingBottom = padding.bottom + TOCStyles.listPadding; + return ListView( + controller: _scrollController, padding: EdgeInsets.only( - top: padding.top + 2, - bottom: padding.bottom + 2, + top: _listPaddingTop, + bottom: _listPaddingBottom, right: padding.right, ), - itemCount: itemCount, - itemBuilder: (context, index) { - if (widget.hasFirstSection && index == 0) { - // 创建首项 - return TOCItem( - text: "简介", - anchor: "_firstSection", - active: widget.activedItem == "_firstSection", - onPressed: handleTOCItemPressed, - ); - } - - var section = - widget.hasFirstSection ? widget.sections[index - 1] : widget.sections[index]; - return Container( - decoration: BoxDecoration( - border: Border( - top: index == 0 - ? BorderSide.none - : const BorderSide(color: Color.fromRGBO(234, 236, 240, 1))), - ), - child: TOCItem( - text: section.line, - number: section.number, - anchor: section.anchor, - active: widget.activedItem == section.anchor, - onPressed: handleTOCItemPressed, - ), - ); - }, - ), - ), + children: tocItemList, + ); + }), ), ); } @@ -169,7 +206,7 @@ class TOCItem extends StatelessWidget { bottom: 0, width: 4, child: Container( - color: const Color.fromRGBO(51, 102, 204, 1), + color: TOCStyles.activeColor, ), ), ], diff --git a/lib/pages/about.dart b/lib/pages/about.dart index 4271c8b..2bcdb86 100755 --- a/lib/pages/about.dart +++ b/lib/pages/about.dart @@ -1,4 +1,3 @@ -import 'package:cupertino_lists/cupertino_lists.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; diff --git a/lib/pages/article.dart b/lib/pages/article.dart index d27c9b9..9a5b36e 100755 --- a/lib/pages/article.dart +++ b/lib/pages/article.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; +import 'package:flutter_share/flutter_share.dart'; import 'package:flutter_slider_drawer/flutter_slider_drawer.dart'; import 'package:get/get.dart'; import 'package:isekai_wiki/api/mw/list.dart'; @@ -12,10 +13,13 @@ import 'package:isekai_wiki/components/nav_bar_button.dart'; import 'package:isekai_wiki/components/safearea_builder.dart'; import 'package:isekai_wiki/components/toc.dart'; import 'package:isekai_wiki/components/wikipage_parser.dart'; +import 'package:isekai_wiki/global.dart'; import 'package:isekai_wiki/models/favorite_list.dart'; import 'package:isekai_wiki/reactive/reactive.dart'; import 'package:isekai_wiki/utils/dialog.dart'; import 'package:isekai_wiki/utils/error.dart'; +import 'package:isekai_wiki/utils/utils.dart'; +import 'package:share_plus/share_plus.dart'; import '../components/isekai_nav_bar.dart'; import '../components/isekai_page_scaffold.dart'; @@ -103,7 +107,20 @@ class ArticlePageController extends GetxController { alert(Get.overlayContext!, "评论功能暂未完成"); } - void handleMenuButtonClick() { + void handleShareButtonClick() { + if (pageInfo.value != null) { + var pageUrl = pageInfo.value!.fullurl ?? getPageUrl(pageInfo.value!.title); + var shareTitle = "${pageInfo.value!.title} - ${Global.siteTitle}"; + + var shareText = "$shareTitle\n$pageUrl"; + FlutterShare.share( + title: shareTitle, text: shareTitle, linkUrl: pageUrl, chooserTitle: "分享到"); + } else { + alert(Get.overlayContext!, "页面还未加载完成"); + } + } + + void handleTOCButtonClick() { menuSlider.currentState?.openSlider(); } @@ -215,7 +232,7 @@ class _ArticlePageState extends ReactiveState { }), NavBarButton( icon: CupertinoIcons.share, - onPressed: c.handleFlowButtonClick, + onPressed: c.handleShareButtonClick, semanticLabel: "分享", ), NavBarButton( @@ -225,7 +242,7 @@ class _ArticlePageState extends ReactiveState { ), NavBarButton( icon: CupertinoIcons.list_bullet, - onPressed: c.handleMenuButtonClick, + onPressed: c.handleTOCButtonClick, semanticLabel: "目录", ), ], diff --git a/lib/pages/own_profile.dart b/lib/pages/own_profile.dart index 334ee16..5f06360 100755 --- a/lib/pages/own_profile.dart +++ b/lib/pages/own_profile.dart @@ -1,5 +1,4 @@ import 'package:cached_network_image/cached_network_image.dart'; -import 'package:cupertino_lists/cupertino_lists.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:get/get.dart'; diff --git a/lib/pages/settings/list.dart b/lib/pages/settings/list.dart index 0e9298a..b501b4c 100644 --- a/lib/pages/settings/list.dart +++ b/lib/pages/settings/list.dart @@ -1,4 +1,3 @@ -import 'package:cupertino_lists/cupertino_lists.dart'; import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; import 'package:isekai_wiki/components/dummy_icon.dart'; diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 8b13789..66fffda 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -1 +1,6 @@ +import 'package:isekai_wiki/global.dart'; +String getPageUrl(String title) { + var titleEncoded = Uri.encodeFull(title.replaceAll(RegExp(r" "), "_")); + return Global.siteConfig.pageUrlTemplate.replaceAll(RegExp(r"\$1"), titleEncoded); +} diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 5b08185..95a0dfd 100755 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,6 +7,7 @@ import Foundation import package_info_plus import path_provider_foundation +import share_plus import sqflite import url_launcher_macos import wakelock_macos @@ -14,6 +15,7 @@ import wakelock_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) diff --git a/packages/flutter_slider_drawer b/packages/flutter_slider_drawer index 1faaf0e..339d58a 160000 --- a/packages/flutter_slider_drawer +++ b/packages/flutter_slider_drawer @@ -1 +1 @@ -Subproject commit 1faaf0e222b5155f6533abdf8df7b9273a6e06c4 +Subproject commit 339d58aac7b404f21964bcb44c22bf5f39ba2e77 diff --git a/pubspec.lock b/pubspec.lock index 4483290..c980772 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,6 +5,7 @@ packages: dependency: transitive description: name: _fe_analyzer_shared + sha256: "3444216bfd127af50bbe4862d8843ed44db946dd933554f0d7285e89f10e28ac" url: "https://pub.flutter-io.cn" source: hosted version: "50.0.0" @@ -12,6 +13,7 @@ packages: dependency: transitive description: name: analyzer + sha256: "68796c31f510c8455a06fed75fc97d8e5ad04d324a830322ab3efc9feb6201c1" url: "https://pub.flutter-io.cn" source: hosted version: "5.2.0" @@ -19,6 +21,7 @@ packages: dependency: "direct main" description: name: animated_snack_bar + sha256: "12459c60530f6652e93adfafa24b0ff8d8dc44ad7be01103cb4370f3776435d5" url: "https://pub.flutter-io.cn" source: hosted version: "0.3.0" @@ -26,6 +29,7 @@ packages: dependency: "direct main" description: name: animations + sha256: fe8a6bdca435f718bb1dc8a11661b2c22504c6da40ef934cee8327ed77934164 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.7" @@ -33,6 +37,7 @@ packages: dependency: transitive description: name: args + sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611" url: "https://pub.flutter-io.cn" source: hosted version: "2.3.2" @@ -40,20 +45,23 @@ packages: dependency: "direct main" description: name: async + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 url: "https://pub.flutter-io.cn" source: hosted - version: "2.9.0" + version: "2.10.0" boolean_selector: dependency: transitive description: name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" url: "https://pub.flutter-io.cn" source: hosted version: "2.3.1" @@ -61,6 +69,7 @@ packages: dependency: transitive description: name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" @@ -68,6 +77,7 @@ packages: dependency: transitive description: name: build_daemon + sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" @@ -75,6 +85,7 @@ packages: dependency: transitive description: name: build_resolvers + sha256: "7c35a3a7868626257d8aee47b51c26b9dba11eaddf3431117ed2744951416aab" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" @@ -82,6 +93,7 @@ packages: dependency: "direct dev" description: name: build_runner + sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 url: "https://pub.flutter-io.cn" source: hosted version: "2.3.3" @@ -89,6 +101,7 @@ packages: dependency: transitive description: name: build_runner_core + sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" url: "https://pub.flutter-io.cn" source: hosted version: "7.2.7" @@ -96,6 +109,7 @@ packages: dependency: transitive description: name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" url: "https://pub.flutter-io.cn" source: hosted version: "5.1.1" @@ -103,6 +117,7 @@ packages: dependency: transitive description: name: built_value + sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725" url: "https://pub.flutter-io.cn" source: hosted version: "8.4.3" @@ -110,6 +125,7 @@ packages: dependency: "direct main" description: name: cached_network_image + sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 url: "https://pub.flutter-io.cn" source: hosted version: "3.2.3" @@ -117,6 +133,7 @@ packages: dependency: transitive description: name: cached_network_image_platform_interface + sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -124,6 +141,7 @@ packages: dependency: transitive description: name: cached_network_image_web + sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 url: "https://pub.flutter-io.cn" source: hosted version: "1.0.2" @@ -131,6 +149,7 @@ packages: dependency: transitive description: name: characters + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c url: "https://pub.flutter-io.cn" source: hosted version: "1.2.1" @@ -138,6 +157,7 @@ packages: dependency: transitive description: name: checked_yaml + sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" @@ -145,6 +165,7 @@ packages: dependency: transitive description: name: chewie + sha256: e9da4898ee4859825404f507969f57113c04ca0060e152b95c9afd73934126ad url: "https://pub.flutter-io.cn" source: hosted version: "1.4.0" @@ -152,6 +173,7 @@ packages: dependency: transitive description: name: chewie_audio + sha256: f92bb4364ced21318e1a7c0eddaf249a7554e5cf27f869d58c44d926abd292a7 url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" @@ -159,6 +181,7 @@ packages: dependency: transitive description: name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" @@ -166,6 +189,7 @@ packages: dependency: transitive description: name: code_builder + sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" url: "https://pub.flutter-io.cn" source: hosted version: "4.4.0" @@ -173,13 +197,15 @@ packages: dependency: transitive description: name: collection + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 url: "https://pub.flutter-io.cn" source: hosted - version: "1.16.0" + version: "1.17.0" convert: dependency: transitive description: name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.1" @@ -187,13 +213,23 @@ packages: dependency: transitive description: name: cookie_jar + sha256: d1cc6516a190ba667941f722b6365d202caff3dacb38de24268b8d6ff1ec8a1d url: "https://pub.flutter-io.cn" source: hosted version: "3.0.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: f71079978789bc2fe78d79227f1f8cfe195b31bbd8db2399b0d15a4b96fb843b + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.3+2" crypto: dependency: transitive description: name: crypto + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" @@ -201,6 +237,7 @@ packages: dependency: transitive description: name: csslib + sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 url: "https://pub.flutter-io.cn" source: hosted version: "0.17.2" @@ -208,6 +245,7 @@ packages: dependency: "direct main" description: name: cupertino_icons + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be url: "https://pub.flutter-io.cn" source: hosted version: "1.0.5" @@ -215,6 +253,7 @@ packages: dependency: "direct main" description: name: cupertino_lists + sha256: "3f31cce75a36bb9bb6a6687f8842bfa1cfa6aaaa1f4c23482485732650d2b602" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" @@ -222,6 +261,7 @@ packages: dependency: transitive description: name: dart_style + sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" url: "https://pub.flutter-io.cn" source: hosted version: "2.2.4" @@ -229,6 +269,7 @@ packages: dependency: "direct main" description: name: dio + sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" url: "https://pub.flutter-io.cn" source: hosted version: "4.0.6" @@ -236,6 +277,7 @@ packages: dependency: "direct main" description: name: dio_cache_interceptor + sha256: "3f76df600621f3a8ed9c57db053f602b24c7e64c108fbc2791d0fe779c52b45b" url: "https://pub.flutter-io.cn" source: hosted version: "3.3.1" @@ -243,6 +285,7 @@ packages: dependency: "direct main" description: name: dio_cookie_manager + sha256: ed7ee3ba6cdb54599c8984d5a4ce09675c553ead6c28608eb54e38eec5b4f954 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -250,6 +293,7 @@ packages: dependency: "direct main" description: name: dio_http2_adapter + sha256: f4ce5e29aaf24c6c1b99b2135c8f4f03c3e2f1b7b535bbfdc859f0c5a74a8298 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -257,6 +301,7 @@ packages: dependency: transitive description: name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" @@ -264,6 +309,7 @@ packages: dependency: transitive description: name: ffi + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" @@ -271,6 +317,7 @@ packages: dependency: transitive description: name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" url: "https://pub.flutter-io.cn" source: hosted version: "6.1.4" @@ -278,6 +325,7 @@ packages: dependency: transitive description: name: fixnum + sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" @@ -290,6 +338,7 @@ packages: dependency: transitive description: name: flutter_blurhash + sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" url: "https://pub.flutter-io.cn" source: hosted version: "0.7.0" @@ -297,6 +346,7 @@ packages: dependency: transitive description: name: flutter_cache_manager + sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" url: "https://pub.flutter-io.cn" source: hosted version: "3.3.0" @@ -304,6 +354,7 @@ packages: dependency: "direct main" description: name: flutter_displaymode + sha256: "042f4910ccc5620c58bb598dead6f868261268cf73a22fa93c9f0c57c3c0e666" url: "https://pub.flutter-io.cn" source: hosted version: "0.3.2" @@ -311,6 +362,7 @@ packages: dependency: "direct main" description: name: flutter_html + sha256: ccb810fcabfce3a7ffaca46e458323915ac7e7fc59082c7357ff848972c02230 url: "https://pub.flutter-io.cn" source: hosted version: "2.2.1" @@ -318,6 +370,7 @@ packages: dependency: "direct main" description: name: flutter_inappwebview + sha256: f73505c792cf083d5566e1a94002311be497d984b5607f25be36d685cf6361cf url: "https://pub.flutter-io.cn" source: hosted version: "5.7.2+3" @@ -325,6 +378,7 @@ packages: dependency: transitive description: name: flutter_layout_grid + sha256: "86c1b21520612edfbb93f189b3ec05058470570f3a5c08ce10c92cc76a6e814e" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.6" @@ -332,6 +386,7 @@ packages: dependency: "direct dev" description: name: flutter_lints + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" @@ -344,9 +399,18 @@ packages: dependency: transitive description: name: flutter_math_fork + sha256: a34205227e1a1d040a56e74a5e2e56e9397ea930540a9373bd0b3e2e4f122017 url: "https://pub.flutter-io.cn" source: hosted version: "0.5.0" + flutter_share: + dependency: "direct main" + description: + name: flutter_share + sha256: ae12c1cea13b35926a109824ffac601531e40cb94ad53eeae58625eceb3eaaaa + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" flutter_slider_drawer: dependency: "direct main" description: @@ -358,6 +422,7 @@ packages: dependency: transitive description: name: flutter_svg + sha256: cbf529d563dd910a249041bde2a0dfc3cf62280fcc459b85f3d614b2ab73abb3 url: "https://pub.flutter-io.cn" source: hosted version: "0.23.0+1" @@ -370,6 +435,7 @@ packages: dependency: "direct main" description: name: flutter_web_browser + sha256: a5564b736253f745e147b8c4eff86de436324d081974cc1f16bff881134a400f url: "https://pub.flutter-io.cn" source: hosted version: "0.17.1" @@ -382,6 +448,7 @@ packages: dependency: "direct main" description: name: fluttertoast + sha256: "7cc92eabe01e3f1babe1571c5560b135dfc762a34e41e9056881e2196b178ec1" url: "https://pub.flutter-io.cn" source: hosted version: "8.1.2" @@ -389,6 +456,7 @@ packages: dependency: "direct dev" description: name: freezed + sha256: e819441678f1679b719008ff2ff0ef045d66eed9f9ec81166ca0d9b02a187454 url: "https://pub.flutter-io.cn" source: hosted version: "2.3.2" @@ -396,6 +464,7 @@ packages: dependency: "direct main" description: name: freezed_annotation + sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 url: "https://pub.flutter-io.cn" source: hosted version: "2.2.0" @@ -403,6 +472,7 @@ packages: dependency: transitive description: name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" @@ -410,6 +480,7 @@ packages: dependency: "direct main" description: name: get + sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a" url: "https://pub.flutter-io.cn" source: hosted version: "4.6.5" @@ -417,6 +488,7 @@ packages: dependency: "direct main" description: name: get_storage + sha256: "00b3908d9cd4138738b4db69bcc0fc1cf4ee8570c06594136569470f32a84207" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.3" @@ -424,6 +496,7 @@ packages: dependency: transitive description: name: glob + sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" @@ -431,6 +504,7 @@ packages: dependency: transitive description: name: graphs + sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 url: "https://pub.flutter-io.cn" source: hosted version: "2.2.0" @@ -438,6 +512,7 @@ packages: dependency: transitive description: name: html + sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 url: "https://pub.flutter-io.cn" source: hosted version: "0.15.1" @@ -445,6 +520,7 @@ packages: dependency: transitive description: name: http + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" url: "https://pub.flutter-io.cn" source: hosted version: "0.13.5" @@ -452,6 +528,7 @@ packages: dependency: "direct main" description: name: http2 + sha256: "58805ebc6513eed3b98ee0a455a8357e61d187bf2e0fdc1e53120770f78de258" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" @@ -459,6 +536,7 @@ packages: dependency: transitive description: name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" @@ -466,6 +544,7 @@ packages: dependency: transitive description: name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.flutter-io.cn" source: hosted version: "4.0.2" @@ -473,6 +552,7 @@ packages: dependency: "direct main" description: name: intl + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" url: "https://pub.flutter-io.cn" source: hosted version: "0.17.0" @@ -480,6 +560,7 @@ packages: dependency: transitive description: name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.4" @@ -487,13 +568,15 @@ packages: dependency: transitive description: name: js + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.4" + version: "0.6.5" json_annotation: dependency: "direct main" description: name: json_annotation + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 url: "https://pub.flutter-io.cn" source: hosted version: "4.8.0" @@ -501,6 +584,7 @@ packages: dependency: "direct dev" description: name: json_serializable + sha256: "040088d9eb2337f3a51ddabe35261e2fea1c351e3dd29d755ed1290b6b700a75" url: "https://pub.flutter-io.cn" source: hosted version: "6.6.0" @@ -508,6 +592,7 @@ packages: dependency: "direct main" description: name: like_button + sha256: "08e6a45b78888412df5d351786c550205ad3a677e72a0820d5bbc0b063c8a463" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" @@ -515,6 +600,7 @@ packages: dependency: transitive description: name: lints + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" @@ -522,6 +608,7 @@ packages: dependency: transitive description: name: logging + sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" @@ -529,20 +616,23 @@ packages: dependency: transitive description: name: matcher + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0" @@ -550,6 +640,7 @@ packages: dependency: transitive description: name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e url: "https://pub.flutter-io.cn" source: hosted version: "1.0.4" @@ -557,6 +648,7 @@ packages: dependency: "direct main" description: name: modal_bottom_sheet + sha256: ef533916a2c3089571c32bd34e410faca77a6849a3f28f748e0794525c5658a0 url: "https://pub.flutter-io.cn" source: hosted version: "2.1.2" @@ -564,6 +656,7 @@ packages: dependency: transitive description: name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" @@ -571,6 +664,7 @@ packages: dependency: transitive description: name: numerus + sha256: "0087ef729d63b96cb347a9c44b9c592f21cecb3605b415bbd18710aef80ce5cb" url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" @@ -578,6 +672,7 @@ packages: dependency: transitive description: name: octo_image + sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.2" @@ -585,6 +680,7 @@ packages: dependency: transitive description: name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" @@ -592,6 +688,7 @@ packages: dependency: "direct main" description: name: package_info_plus + sha256: f619162573096d428ccde2e33f92e05b5a179cd6f0e3120c1005f181bee8ed16 url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" @@ -599,6 +696,7 @@ packages: dependency: transitive description: name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" @@ -606,6 +704,7 @@ packages: dependency: transitive description: name: path + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b url: "https://pub.flutter-io.cn" source: hosted version: "1.8.2" @@ -613,6 +712,7 @@ packages: dependency: transitive description: name: path_drawing + sha256: "3bdd251dae9ffaef944450b73f168610db7e968e7b20daf0c3907f8b4aafc8a2" url: "https://pub.flutter-io.cn" source: hosted version: "0.5.1+1" @@ -620,6 +720,7 @@ packages: dependency: transitive description: name: path_parsing + sha256: ee5c47c1058ad66b4a41746ec3996af9593d0858872807bcd64ac118f0700337 url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1" @@ -627,6 +728,7 @@ packages: dependency: "direct main" description: name: path_provider + sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.12" @@ -634,6 +736,7 @@ packages: dependency: transitive description: name: path_provider_android + sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e url: "https://pub.flutter-io.cn" source: hosted version: "2.0.22" @@ -641,6 +744,7 @@ packages: dependency: transitive description: name: path_provider_foundation + sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" @@ -648,6 +752,7 @@ packages: dependency: transitive description: name: path_provider_linux + sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379 url: "https://pub.flutter-io.cn" source: hosted version: "2.1.7" @@ -655,6 +760,7 @@ packages: dependency: transitive description: name: path_provider_platform_interface + sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" @@ -662,6 +768,7 @@ packages: dependency: transitive description: name: path_provider_windows + sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c url: "https://pub.flutter-io.cn" source: hosted version: "2.1.3" @@ -669,6 +776,7 @@ packages: dependency: transitive description: name: pedantic + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" url: "https://pub.flutter-io.cn" source: hosted version: "1.11.1" @@ -676,6 +784,7 @@ packages: dependency: transitive description: name: petitparser + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" url: "https://pub.flutter-io.cn" source: hosted version: "5.1.0" @@ -683,6 +792,7 @@ packages: dependency: transitive description: name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" @@ -690,6 +800,7 @@ packages: dependency: transitive description: name: plugin_platform_interface + sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a url: "https://pub.flutter-io.cn" source: hosted version: "2.1.3" @@ -697,6 +808,7 @@ packages: dependency: transitive description: name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" url: "https://pub.flutter-io.cn" source: hosted version: "1.5.1" @@ -704,6 +816,7 @@ packages: dependency: transitive description: name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" url: "https://pub.flutter-io.cn" source: hosted version: "4.2.4" @@ -711,6 +824,7 @@ packages: dependency: "direct main" description: name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f url: "https://pub.flutter-io.cn" source: hosted version: "6.0.5" @@ -718,6 +832,7 @@ packages: dependency: transitive description: name: pub_semver + sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.3" @@ -725,6 +840,7 @@ packages: dependency: transitive description: name: pubspec_parse + sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" url: "https://pub.flutter-io.cn" source: hosted version: "1.2.1" @@ -732,6 +848,7 @@ packages: dependency: "direct main" description: name: pull_down_button + sha256: "31cb3c3c13d7af7b386cfc7a3957c5bda97efa4aa35fedfd42bb838d60530fd4" url: "https://pub.flutter-io.cn" source: hosted version: "0.4.1" @@ -739,6 +856,7 @@ packages: dependency: transitive description: name: quiver + sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" @@ -746,6 +864,7 @@ packages: dependency: "direct main" description: name: responsive_builder + sha256: f01bc341c73b6db7bd6319e22d2c160f28f924399ae46e6699ecc8160ba2765c url: "https://pub.flutter-io.cn" source: hosted version: "0.4.3" @@ -753,6 +872,7 @@ packages: dependency: "direct main" description: name: roundcheckbox + sha256: "5d6f607ed9d26fde0072af2545f56d84a6b6d2a45972b0c41f90c2d73224f339" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" @@ -760,6 +880,7 @@ packages: dependency: transitive description: name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" url: "https://pub.flutter-io.cn" source: hosted version: "0.27.7" @@ -767,6 +888,7 @@ packages: dependency: transitive description: name: scroll_bars_common + sha256: "9a46b430ca602b4fb6c15c6f021d85fd00e561b0b698f11cb13c9e032ee9d93e" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" @@ -774,20 +896,31 @@ packages: dependency: "direct main" description: name: scroll_bottom_navigation_bar + sha256: "916c3889c349044a03339020dcaf7ca6d9c14662e84f030f4c57b37df498aca9" url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0" - scrollable_positioned_list: + share_plus: dependency: "direct main" description: - name: scrollable_positioned_list + name: share_plus + sha256: e387077716f80609bb979cd199331033326033ecd1c8f200a90c5f57b1c9f55e + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.0" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + sha256: "82ddd4ab9260c295e6e39612d4ff00390b9a7a21f1bb1da771e2f232d80ab8a1" url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.5" + version: "3.2.0" shelf: dependency: transitive description: name: shelf + sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c url: "https://pub.flutter-io.cn" source: hosted version: "1.4.0" @@ -795,6 +928,7 @@ packages: dependency: transitive description: name: shelf_web_socket + sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 url: "https://pub.flutter-io.cn" source: hosted version: "1.0.3" @@ -802,6 +936,7 @@ packages: dependency: "direct main" description: name: skeletons + sha256: "5b2d08ae7f908ee1f7007ca99f8dcebb4bfc1d3cb2143dec8d112a5be5a45c8f" url: "https://pub.flutter-io.cn" source: hosted version: "0.0.3" @@ -814,6 +949,7 @@ packages: dependency: transitive description: name: source_gen + sha256: "2d79738b6bbf38a43920e2b8d189e9a3ce6cc201f4b8fc76be5e4fe377b1c38d" url: "https://pub.flutter-io.cn" source: hosted version: "1.2.6" @@ -821,6 +957,7 @@ packages: dependency: transitive description: name: source_helper + sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" url: "https://pub.flutter-io.cn" source: hosted version: "1.3.3" @@ -828,13 +965,15 @@ packages: dependency: transitive description: name: source_span + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 url: "https://pub.flutter-io.cn" source: hosted - version: "1.9.0" + version: "1.9.1" sqflite: dependency: transitive description: name: sqflite + sha256: "78324387dc81df14f78df06019175a86a2ee0437624166c382e145d0a7fd9a4f" url: "https://pub.flutter-io.cn" source: hosted version: "2.2.4+1" @@ -842,6 +981,7 @@ packages: dependency: transitive description: name: sqflite_common + sha256: bfd6973aaeeb93475bc0d875ac9aefddf7965ef22ce09790eb963992ffc5183f url: "https://pub.flutter-io.cn" source: hosted version: "2.4.2+2" @@ -849,20 +989,23 @@ packages: dependency: transitive description: name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 url: "https://pub.flutter-io.cn" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" @@ -870,13 +1013,15 @@ packages: dependency: transitive description: name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" + version: "1.2.0" synchronized: dependency: transitive description: name: synchronized + sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.1" @@ -884,6 +1029,7 @@ packages: dependency: transitive description: name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.flutter-io.cn" source: hosted version: "1.2.1" @@ -891,13 +1037,15 @@ packages: dependency: transitive description: name: test_api + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.12" + version: "0.4.16" timing: dependency: transitive description: name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" @@ -905,6 +1053,7 @@ packages: dependency: transitive description: name: tuple + sha256: "0ea99cd2f9352b2586583ab2ce6489d1f95a5f6de6fb9492faaf97ae2060f0aa" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" @@ -912,6 +1061,7 @@ packages: dependency: transitive description: name: typed_data + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" @@ -919,6 +1069,7 @@ packages: dependency: "direct main" description: name: url_launcher + sha256: "698fa0b4392effdc73e9e184403b627362eb5fbf904483ac9defbb1c2191d809" url: "https://pub.flutter-io.cn" source: hosted version: "6.1.8" @@ -926,6 +1077,7 @@ packages: dependency: transitive description: name: url_launcher_android + sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1" url: "https://pub.flutter-io.cn" source: hosted version: "6.0.23" @@ -933,6 +1085,7 @@ packages: dependency: transitive description: name: url_launcher_ios + sha256: bb328b24d3bccc20bdf1024a0990ac4f869d57663660de9c936fb8c043edefe3 url: "https://pub.flutter-io.cn" source: hosted version: "6.0.18" @@ -940,6 +1093,7 @@ packages: dependency: transitive description: name: url_launcher_linux + sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" @@ -947,6 +1101,7 @@ packages: dependency: transitive description: name: url_launcher_macos + sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" @@ -954,6 +1109,7 @@ packages: dependency: transitive description: name: url_launcher_platform_interface + sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" @@ -961,6 +1117,7 @@ packages: dependency: transitive description: name: url_launcher_web + sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.14" @@ -968,6 +1125,7 @@ packages: dependency: transitive description: name: url_launcher_windows + sha256: b6217370f8eb1fd85c8890c539f5a639a01ab209a36db82c921ebeacefc7a615 url: "https://pub.flutter-io.cn" source: hosted version: "3.0.3" @@ -975,6 +1133,7 @@ packages: dependency: transitive description: name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.7" @@ -982,13 +1141,15 @@ packages: dependency: transitive description: name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.2" + version: "2.1.4" video_player: dependency: transitive description: name: video_player + sha256: "59f7f31c919c59cbedd37c617317045f5f650dc0eeb568b0b0de9a36472bdb28" url: "https://pub.flutter-io.cn" source: hosted version: "2.5.1" @@ -996,6 +1157,7 @@ packages: dependency: transitive description: name: video_player_android + sha256: "984388511230bac63feb53b2911a70e829fe0976b6b2213f5c579c4e0a882db3" url: "https://pub.flutter-io.cn" source: hosted version: "2.3.10" @@ -1003,6 +1165,7 @@ packages: dependency: transitive description: name: video_player_avfoundation + sha256: d9f7a46d6a77680adb03ec05a381025d6e890ebe636637c6c3014cc3926b97e9 url: "https://pub.flutter-io.cn" source: hosted version: "2.3.8" @@ -1010,6 +1173,7 @@ packages: dependency: transitive description: name: video_player_platform_interface + sha256: "42bb75de5e9b79e1f20f1d95f688fac0f95beac4d89c6eb2cd421724d4432dae" url: "https://pub.flutter-io.cn" source: hosted version: "6.0.1" @@ -1017,6 +1181,7 @@ packages: dependency: transitive description: name: video_player_web + sha256: b649b07b8f8f553bee4a97a0a53d0fe78a70b115eafaf0105b612b32b05ddb99 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.13" @@ -1024,6 +1189,7 @@ packages: dependency: transitive description: name: wakelock + sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" url: "https://pub.flutter-io.cn" source: hosted version: "0.6.2" @@ -1031,6 +1197,7 @@ packages: dependency: transitive description: name: wakelock_macos + sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" url: "https://pub.flutter-io.cn" source: hosted version: "0.4.0" @@ -1038,6 +1205,7 @@ packages: dependency: transitive description: name: wakelock_platform_interface + sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" url: "https://pub.flutter-io.cn" source: hosted version: "0.3.0" @@ -1045,6 +1213,7 @@ packages: dependency: transitive description: name: wakelock_web + sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" url: "https://pub.flutter-io.cn" source: hosted version: "0.4.0" @@ -1052,6 +1221,7 @@ packages: dependency: transitive description: name: wakelock_windows + sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1" @@ -1059,6 +1229,7 @@ packages: dependency: transitive description: name: watcher + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.2" @@ -1066,6 +1237,7 @@ packages: dependency: "direct main" description: name: web_smooth_scroll + sha256: "2a4adc22e42e4045f02ecc1598885bf46adbe7ed9b05aab0a0f5df9ed071e9b6" url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" @@ -1073,6 +1245,7 @@ packages: dependency: transitive description: name: web_socket_channel + sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b url: "https://pub.flutter-io.cn" source: hosted version: "2.3.0" @@ -1080,6 +1253,7 @@ packages: dependency: transitive description: name: webview_flutter + sha256: "6886b3ceef1541109df5001054aade5ee3c36b5780302e41701c78357233721c" url: "https://pub.flutter-io.cn" source: hosted version: "2.8.0" @@ -1087,6 +1261,7 @@ packages: dependency: transitive description: name: webview_flutter_android + sha256: "8b3b2450e98876c70bfcead876d9390573b34b9418c19e28168b74f6cb252dbd" url: "https://pub.flutter-io.cn" source: hosted version: "2.10.4" @@ -1094,6 +1269,7 @@ packages: dependency: transitive description: name: webview_flutter_platform_interface + sha256: "812165e4e34ca677bdfbfa58c01e33b27fd03ab5fa75b70832d4b7d4ca1fa8cf" url: "https://pub.flutter-io.cn" source: hosted version: "1.9.5" @@ -1101,6 +1277,7 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview + sha256: a5364369c758892aa487cbf59ea41d9edd10f9d9baf06a94e80f1bd1b4c7bbc0 url: "https://pub.flutter-io.cn" source: hosted version: "2.9.5" @@ -1108,6 +1285,7 @@ packages: dependency: transitive description: name: win32 + sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 url: "https://pub.flutter-io.cn" source: hosted version: "3.1.3" @@ -1115,6 +1293,7 @@ packages: dependency: transitive description: name: xdg_directories + sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0+3" @@ -1122,6 +1301,7 @@ packages: dependency: transitive description: name: xml + sha256: "80d494c09849dc3f899d227a78c30c5b949b985ededf884cb3f3bcd39f4b447a" url: "https://pub.flutter-io.cn" source: hosted version: "5.4.1" @@ -1129,9 +1309,10 @@ packages: dependency: transitive description: name: yaml + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.1" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.18.0 <4.0.0" flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5f0257f..8f1a591 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,8 @@ dependencies: like_button: ^2.0.4 skeletons: ^0.0.3 scroll_bottom_navigation_bar: ^4.0.0 - scrollable_positioned_list: ^0.3.5 + share_plus: ^6.3.0 + flutter_share: ^2.0.0 modal_bottom_sheet: ^2.1.2 fluttertoast: ^8.1.2 animated_snack_bar: ^0.3.0 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 4f78848..c3384ec 100755 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,9 +6,12 @@ #include "generated_plugin_registrant.h" +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { + SharePlusWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 88b22e5..01d3836 100755 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + share_plus url_launcher_windows )