Revert "web: slide_puzzle - update to latest provider port"

Seeing an issue with generics and dart2js (or DDC)

This reverts commit 7a42263344.
pull/92/head
Kevin Moore 6 years ago
parent 92b6848c3c
commit c78b873f7d

@ -90,7 +90,7 @@ class PuzzleHomeState extends State
providers: [ providers: [
Provider<AppState>.value(value: this), Provider<AppState>.value(value: this),
ListenableProvider<PuzzleControls>.value( ListenableProvider<PuzzleControls>.value(
value: _autoPlayListenable, listenable: _autoPlayListenable,
) )
], ],
child: Material( child: Material(
@ -222,14 +222,17 @@ Widget _doBuildCore(bool small) => ValueTabController<SharedTheme>(
), ),
), ),
), ),
margin: const EdgeInsets.symmetric(horizontal: 20), margin:
const EdgeInsets.symmetric(horizontal: 20),
child: TabBar( child: TabBar(
controller: ValueTabController.of(context), controller: ValueTabController.of(context),
labelPadding: const EdgeInsets.fromLTRB(0, 20, 0, 12), labelPadding:
const EdgeInsets.fromLTRB(0, 20, 0, 12),
labelColor: theme.puzzleAccentColor, labelColor: theme.puzzleAccentColor,
indicatorColor: theme.puzzleAccentColor, indicatorColor: theme.puzzleAccentColor,
indicatorWeight: 1.5, indicatorWeight: 1.5,
unselectedLabelColor: Colors.black.withOpacity(0.6), unselectedLabelColor:
Colors.black.withOpacity(0.6),
tabs: themes tabs: themes
.map((st) => Text( .map((st) => Text(
st.name.toUpperCase(), st.name.toUpperCase(),
@ -245,7 +248,9 @@ Widget _doBuildCore(bool small) => ValueTabController<SharedTheme>(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
child: Flow( child: Flow(
delegate: PuzzleFlowDelegate( delegate: PuzzleFlowDelegate(
small ? const Size(90, 90) : const Size(140, 140), small
? const Size(90, 90)
: const Size(140, 140),
appState.puzzle, appState.puzzle,
appState.animationNotifier, appState.animationNotifier,
), ),
@ -260,7 +265,8 @@ Widget _doBuildCore(bool small) => ValueTabController<SharedTheme>(
Container( Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
border: Border( border: Border(
top: BorderSide(color: Colors.black26, width: 1), top: BorderSide(
color: Colors.black26, width: 1),
), ),
), ),
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
@ -270,8 +276,8 @@ Widget _doBuildCore(bool small) => ValueTabController<SharedTheme>(
right: 10, right: 10,
), ),
child: Consumer<PuzzleControls>( child: Consumer<PuzzleControls>(
builder: (_, controls, __) => builder: (_, controls, __) => Row(
Row(children: theme.bottomControls(controls)), children: theme.bottomControls(controls)),
), ),
) )
], ],

@ -68,7 +68,7 @@ class _ValueTabControllerState<T> extends State<ValueTabController<T>>
controller: _controller, controller: _controller,
enabled: TickerMode.of(context), enabled: TickerMode.of(context),
child: ValueListenableProvider.value( child: ValueListenableProvider.value(
value: _notifier, valueListenable: _notifier,
child: widget.child, child: widget.child,
), ),
); );

@ -339,10 +339,10 @@ packages:
description: description:
path: "." path: "."
ref: flutter_web ref: flutter_web
resolved-ref: e41db8e7d554360a6d8314c23b4fb4d5d5d9aac4 resolved-ref: "5cf4521d4d635d7d7ca8ddbd6e28048a7f319ee0"
url: "https://github.com/kevmoo/provider" url: "https://github.com/kevmoo/provider"
source: git source: git
version: "3.0.0+1" version: "2.1.0"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save