lbry-sdk/dart/packages/ver/lib/main.dart

50 lines
1.1 KiB
Dart
Raw Normal View History

2019-07-10 03:10:37 +02:00
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart' show debugDefaultTargetPlatformOverride;
2019-07-10 23:28:02 +02:00
import 'package:ver/utils.dart';
import 'package:ver/time_series_chart.dart';
2019-07-10 03:10:37 +02:00
2019-07-10 23:28:02 +02:00
class VerApp extends StatelessWidget {
2019-07-10 03:10:37 +02:00
@override
Widget build(BuildContext context) {
return MaterialApp(
2019-07-10 23:28:02 +02:00
title: 'Ver',
2019-07-10 03:10:37 +02:00
theme: ThemeData(
2019-07-10 23:28:02 +02:00
brightness: Brightness.light,
primarySwatch: Colors.lightBlue,
fontFamily: 'Roboto',
2019-07-10 03:10:37 +02:00
),
2019-07-10 23:28:02 +02:00
home: VerHomePage(title: 'Wallet Server'),
2019-07-10 03:10:37 +02:00
);
}
}
2019-07-10 23:28:02 +02:00
class VerHomePage extends StatefulWidget {
VerHomePage({Key key, this.title}) : super(key: key);
2019-07-10 03:10:37 +02:00
final String title;
@override
2019-07-10 23:28:02 +02:00
_VerHomePageState createState() => _VerHomePageState();
2019-07-10 03:10:37 +02:00
}
2019-07-10 23:28:02 +02:00
class _VerHomePageState extends State<VerHomePage> {
2019-07-10 03:10:37 +02:00
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
2019-07-10 23:28:02 +02:00
body: new Padding(
padding: const EdgeInsets.all(8.0),
child: SimpleTimeSeriesChart()
2019-07-10 03:10:37 +02:00
),
);
}
}
2019-07-10 23:28:02 +02:00
void main() {
debugDefaultTargetPlatformOverride = getTargetPlatformForDesktop();
runApp(new VerApp());
}