TimeZone support
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:blind_master/BlindMasterResources/secure_transmissions.dart';
|
||||
import 'package:blind_master/BlindMasterResources/text_inputs.dart';
|
||||
import 'package:blind_master/BlindMasterResources/timezone_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
@@ -17,6 +18,7 @@ class _CreateGroupDialogState extends State<CreateGroupDialog> {
|
||||
List<Map<String, dynamic>> devices = [];
|
||||
Map<int, List<Map<String, dynamic>>> devicePeripherals = {};
|
||||
Set<int> selectedPeripheralIds = {};
|
||||
String? _selectedTimezone;
|
||||
bool isLoading = true;
|
||||
String? errorMessage;
|
||||
|
||||
@@ -108,6 +110,7 @@ class _CreateGroupDialogState extends State<CreateGroupDialog> {
|
||||
{
|
||||
'name': _nameController.text.trim(),
|
||||
'peripheral_ids': selectedPeripheralIds.toList(),
|
||||
if (_selectedTimezone != null) 'timezone': _selectedTimezone,
|
||||
},
|
||||
'add_group'
|
||||
);
|
||||
@@ -164,6 +167,12 @@ class _CreateGroupDialogState extends State<CreateGroupDialog> {
|
||||
}
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
TimezonePicker(
|
||||
value: _selectedTimezone,
|
||||
label: 'Group Timezone (optional)',
|
||||
onChanged: (tz) => setState(() => _selectedTimezone = tz),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
|
||||
Reference in New Issue
Block a user