76 lines
2.4 KiB
Dart
76 lines
2.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
class HomePage extends StatelessWidget {
|
|
const HomePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Abawo BT App'),
|
|
actions: [
|
|
IconButton(
|
|
icon: const Icon(Icons.settings),
|
|
onPressed: () => context.go('/settings'),
|
|
),
|
|
],
|
|
),
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
const Text(
|
|
'Welcome to Abawo BT App',
|
|
style: TextStyle(fontSize: 20),
|
|
),
|
|
const SizedBox(height: 20),
|
|
// Devices Section
|
|
Container(
|
|
padding: const EdgeInsets.only(left: 16, right: 16),
|
|
child: Column(
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
const Text(
|
|
'Devices',
|
|
style: TextStyle(
|
|
fontSize: 20, fontWeight: FontWeight.w500),
|
|
),
|
|
IconButton(
|
|
icon: const Icon(Icons.add_circle),
|
|
onPressed: () => context.go('/connect_device'),
|
|
tooltip: 'Connect a device',
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 10),
|
|
Container(
|
|
padding: const EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
border: Border.all(color: Colors.grey.shade300),
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
child: const Center(
|
|
child: Text(
|
|
'No devices connected yet',
|
|
style: TextStyle(color: Colors.grey),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 30),
|
|
ElevatedButton(
|
|
onPressed: () => context.go('/settings'),
|
|
child: const Text('Go to Settings'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|