broken release much
i forgot how to dart for a second there
This commit is contained in:
parent
055163b5b1
commit
1668b784e9
|
@ -80,7 +80,7 @@ class _LogsPageState extends State<LogsPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final appState = Provider.of<AppState>(context, listen: false);
|
final appState = Provider.of<AppState>(context, listen: false);
|
||||||
|
appState.currentIndex = 2;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Logs'),
|
title: const Text('Logs'),
|
||||||
|
@ -90,12 +90,6 @@ class _LogsPageState extends State<LogsPage> {
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(16.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: DataTable(
|
child: DataTable(
|
||||||
columns: const [
|
columns: const [
|
||||||
DataColumn(label: Text('Name')),
|
DataColumn(label: Text('Name')),
|
||||||
|
@ -104,8 +98,7 @@ class _LogsPageState extends State<LogsPage> {
|
||||||
DataColumn(label: Text('Type')),
|
DataColumn(label: Text('Type')),
|
||||||
],
|
],
|
||||||
rows: logs.map((log) {
|
rows: logs.map((log) {
|
||||||
final controlledBy =
|
final controlledBy = log['controlledBy'] as Map<String, dynamic>?;
|
||||||
log['controlledBy'] as Map<String, dynamic>?;
|
|
||||||
if (controlledBy != null) {
|
if (controlledBy != null) {
|
||||||
final name = getDisplayName(controlledBy);
|
final name = getDisplayName(controlledBy);
|
||||||
final intensity = log['intensity'] as int?;
|
final intensity = log['intensity'] as int?;
|
||||||
|
@ -122,15 +115,10 @@ class _LogsPageState extends State<LogsPage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return const DataRow(cells: []);
|
return const DataRow(cells: []);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: BottomBar(
|
bottomNavigationBar: BottomBar(
|
||||||
|
|
|
@ -66,7 +66,7 @@ class _SliderPageState extends State<SliderPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final appState = Provider.of<AppState>(context, listen: false);
|
final appState = Provider.of<AppState>(context, listen: false);
|
||||||
|
appState.currentIndex = 0;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Openshock Companion'),
|
title: const Text('Openshock Companion'),
|
||||||
|
|
|
@ -52,7 +52,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final appState = Provider.of<AppState>(context, listen: false);
|
final appState = Provider.of<AppState>(context, listen: false);
|
||||||
|
appState.currentIndex = 1;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Settings'),
|
title: const Text('Settings'),
|
||||||
|
@ -127,13 +127,14 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||||
appState.currentIndex = index;
|
appState.currentIndex = index;
|
||||||
setState(() {
|
setState(() {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
appState.currentIndex = 0;
|
|
||||||
Navigator.popUntil(context, (route) => route.isFirst);
|
Navigator.popUntil(context, (route) => route.isFirst);
|
||||||
|
appState.currentIndex = 0;
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) => const LogsPage()),
|
MaterialPageRoute(builder: (context) => const LogsPage()),
|
||||||
);
|
);
|
||||||
|
appState.currentIndex = 2;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,7 +4,7 @@ description: Companion app for managing openshock-compatible devices
|
||||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.2.3
|
version: 0.2.4
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.2 <4.0.0'
|
sdk: '>=3.1.2 <4.0.0'
|
||||||
|
|
Loading…
Reference in a new issue