Skip to content

Instantly share code, notes, and snippets.

@jacobaraujo7
Created May 12, 2019 19:39
Show Gist options
  • Select an option

  • Save jacobaraujo7/3e959a84f56dc3dcbce41c33d3bcd9d8 to your computer and use it in GitHub Desktop.

Select an option

Save jacobaraujo7/3e959a84f56dc3dcbce41c33d3bcd9d8 to your computer and use it in GitHub Desktop.
...
Consumer<ValueBloc>(
builder: (BuildContext context, ValueBloc valueBloc) {
return Text("Value: ${valueBloc.value.toStringAsPrecision(1)}",
style: TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
);
},
),
...
Consumer<ValueBloc>(
builder: (BuildContext context, ValueBloc valueBloc) {
return Slider(
activeColor: Colors.white,
inactiveColor: Colors.white,
min: 0.0,
max: 1.0,
onChanged: valueBloc.onChangeValue,
value: valueBloc.value);
},
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment