mirror of
https://github.com/amigan/calls.git
synced 2024-11-21 20:39:47 -05:00
86 lines
2.9 KiB
Dart
86 lines
2.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'lcd.dart';
|
|
import 'keypad.dart';
|
|
|
|
void main() {
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Stillbox Calls',
|
|
theme: ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
|
useMaterial3: true,
|
|
),
|
|
darkTheme: ThemeData(
|
|
brightness: Brightness.dark,
|
|
),
|
|
themeMode: ThemeMode.dark,
|
|
home: const MainRadio(title: 'Stillbox'),
|
|
);
|
|
}
|
|
}
|
|
|
|
class MainRadio extends StatefulWidget {
|
|
const MainRadio({super.key, required this.title});
|
|
|
|
// This widget is the home page of your application. It is stateful, meaning
|
|
// that it has a State object (defined below) that contains fields that affect
|
|
// how it looks.
|
|
|
|
// This class is the configuration for the state. It holds the values (in this
|
|
// case the title) provided by the parent (in this case the App widget) and
|
|
// used by the build method of the State. Fields in a Widget subclass are
|
|
// always marked "final".
|
|
|
|
final String title;
|
|
|
|
@override
|
|
State<MainRadio> createState() => _MainRadioState();
|
|
}
|
|
|
|
class _MainRadioState extends State<MainRadio> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// This method is rerun every time setState is called, for instance as done
|
|
// by the _incrementCounter method above.
|
|
//
|
|
// The Flutter framework has been optimized to make rerunning build methods
|
|
// fast, so that you can just rebuild anything that needs updating rather
|
|
// than having to individually change instances of widgets.
|
|
return Scaffold(
|
|
body: const Center(
|
|
// Center is a layout widget. It takes a single child and positions it
|
|
// in the middle of the parent.
|
|
child: SizedBox(
|
|
width: 500.0,
|
|
child: Column(
|
|
// Column is also a layout widget. It takes a list of children and
|
|
// arranges them vertically. By default, it sizes itself to fit its
|
|
// children horizontally, and tries to be as tall as its parent.
|
|
//
|
|
// Column has various properties to control how it sizes itself and
|
|
// how it positions its children. Here we use mainAxisAlignment to
|
|
// center the children vertically; the main axis here is the vertical
|
|
// axis because Columns are vertical (the cross axis would be
|
|
// horizontal).
|
|
//
|
|
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
|
|
// action in the IDE, or press "p" in the console), to see the
|
|
// wireframe for each widget.
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: <Widget>[
|
|
ScannerLabel(),
|
|
LCD(),
|
|
Keypad(),
|
|
],
|
|
)),
|
|
),
|
|
);
|
|
}
|
|
}
|