Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Slider + Emoji - main.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
double _value = 0;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Container(
child: Slider(
value: _value,
onChanged: (_newValue) => setState(() {
_value = _newValue;
}),
max: 5,
min: 0,
divisions: 5,
label: _value.toString(),
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.