Skip to content

Instantly share code, notes, and snippets.

@ricardoogliari
Created July 7, 2019 03:36
Show Gist options
  • Save ricardoogliari/c3a4ae5f3b33753868c0e72125a6b70f to your computer and use it in GitHub Desktop.
Save ricardoogliari/c3a4ae5f3b33753868c0e72125a6b70f to your computer and use it in GitHub Desktop.
_MyHomePageState.dart
import ...
import 'package:flutter_mqtt/thermometer_widget.dart';
...
class _MyHomePageState extends State<MyHomePage> {
...
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: SizedBox(
child: ThermometerWidget(
borderColor: Colors.red,
innerColor: Colors.green,
indicatorColor: Colors.red,
temperature: _temp,
),
),
),
floatingActionButton: FloatingActionButton(
onPressed: _connect,
tooltip: 'Play',
child: Icon(Icons.play_arrow),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment