Add main screen template

This commit is contained in:
Anton Tananaev 2025-05-05 07:47:09 -07:00
parent 50f745f043
commit 8a1c5199cc
6 changed files with 397 additions and 7 deletions

126
lib/main_screen.dart Normal file
View file

@ -0,0 +1,126 @@
import 'package:flutter/material.dart';
class MainScreen extends StatelessWidget {
const MainScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Main Screen'),
),
body: SingleChildScrollView(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
// Tracking Card
Card(
elevation: 2,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Tracking',
style: TextStyle(
fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text('Device identifier'),
Row(
children: [
const Text('{id}', style: TextStyle(color: Colors.grey)),
IconButton(
icon: const Icon(Icons.copy),
onPressed: () {},
),
],
),
],
),
SwitchListTile(
contentPadding: EdgeInsets.zero,
title: const Text('Continuous tracking'),
value: true,
onChanged: (bool value) {},
),
Align(
alignment: Alignment.centerRight,
child: ElevatedButton(
onPressed: () {},
child: const Text('Send current location'),
),
),
],
),
),
),
const SizedBox(height: 20),
// Settings Card
Card(
elevation: 2,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'Settings',
style: TextStyle(
fontSize: 18, fontWeight: FontWeight.bold),
),
IconButton(
icon: const Icon(Icons.qr_code_scanner),
onPressed: () {},
),
],
),
const SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text('Server'),
Row(
children: [
const Text('https://...',
style: TextStyle(color: Colors.grey)),
IconButton(
icon: const Icon(Icons.edit),
onPressed: () {},
),
],
),
],
),
Align(
alignment: Alignment.centerRight,
child: OutlinedButton(
onPressed: () {},
child: const Text('Advanced settings'),
),
),
],
),
),
),
],
),
),
);
}
}