🐛 Fix timezone error
This commit is contained in:
		@@ -332,30 +332,34 @@ class _AccountProfileDetail extends StatelessWidget {
 | 
			
		||||
              children: _buildSubcolumn(),
 | 
			
		||||
            ),
 | 
			
		||||
          if (data.profile.timeZone.isNotEmpty && !kIsWeb)
 | 
			
		||||
            Column(
 | 
			
		||||
              crossAxisAlignment: CrossAxisAlignment.start,
 | 
			
		||||
              children: [
 | 
			
		||||
                Text('timeZone').tr().bold(),
 | 
			
		||||
                Row(
 | 
			
		||||
                  crossAxisAlignment: CrossAxisAlignment.baseline,
 | 
			
		||||
                  textBaseline: TextBaseline.alphabetic,
 | 
			
		||||
                  spacing: 6,
 | 
			
		||||
                  children: [
 | 
			
		||||
                    Text(data.profile.timeZone),
 | 
			
		||||
                    Text(
 | 
			
		||||
                      getTzInfo(
 | 
			
		||||
                        data.profile.timeZone,
 | 
			
		||||
                      ).$2.formatCustomGlobal('HH:mm'),
 | 
			
		||||
                    ),
 | 
			
		||||
                    Text(
 | 
			
		||||
                      getTzInfo(data.profile.timeZone).$1.formatOffsetLocal(),
 | 
			
		||||
                    ).fontSize(11),
 | 
			
		||||
                    Text(
 | 
			
		||||
                      'UTC${getTzInfo(data.profile.timeZone).$1.formatOffset()}',
 | 
			
		||||
                    ).fontSize(11).opacity(0.75),
 | 
			
		||||
                  ],
 | 
			
		||||
                ),
 | 
			
		||||
              ],
 | 
			
		||||
            Builder(
 | 
			
		||||
              builder: (context) {
 | 
			
		||||
                try {
 | 
			
		||||
                  final tzInfo = getTzInfo(data.profile.timeZone);
 | 
			
		||||
                  return Column(
 | 
			
		||||
                    crossAxisAlignment: CrossAxisAlignment.start,
 | 
			
		||||
                    children: [
 | 
			
		||||
                      Text('timeZone').tr().bold(),
 | 
			
		||||
                      Row(
 | 
			
		||||
                        crossAxisAlignment: CrossAxisAlignment.baseline,
 | 
			
		||||
                        textBaseline: TextBaseline.alphabetic,
 | 
			
		||||
                        spacing: 6,
 | 
			
		||||
                        children: [
 | 
			
		||||
                          Text(data.profile.timeZone),
 | 
			
		||||
                          Text(tzInfo.$2.formatCustomGlobal('HH:mm')),
 | 
			
		||||
                          Text(tzInfo.$1.formatOffsetLocal()).fontSize(11),
 | 
			
		||||
                          Text(
 | 
			
		||||
                            'UTC${tzInfo.$1.formatOffset()}',
 | 
			
		||||
                          ).fontSize(11).opacity(0.75),
 | 
			
		||||
                        ],
 | 
			
		||||
                      ),
 | 
			
		||||
                    ],
 | 
			
		||||
                  );
 | 
			
		||||
                } catch (e) {
 | 
			
		||||
                  // Hide timezone section if timezone is invalid
 | 
			
		||||
                  return const SizedBox.shrink();
 | 
			
		||||
                }
 | 
			
		||||
              },
 | 
			
		||||
            ),
 | 
			
		||||
        ],
 | 
			
		||||
      ).padding(horizontal: 24, vertical: 16),
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@ import 'package:island/widgets/response.dart';
 | 
			
		||||
import 'package:material_symbols_icons/symbols.dart';
 | 
			
		||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
 | 
			
		||||
import 'package:styled_widget/styled_widget.dart';
 | 
			
		||||
import 'package:url_launcher/url_launcher_string.dart';
 | 
			
		||||
 | 
			
		||||
part 'hub.g.dart';
 | 
			
		||||
 | 
			
		||||
@@ -190,13 +189,7 @@ class _ConsoleAppBar extends StatelessWidget implements PreferredSizeWidget {
 | 
			
		||||
            currentProject: currentProject,
 | 
			
		||||
            onProjectChanged: onProjectChanged,
 | 
			
		||||
          ),
 | 
			
		||||
        IconButton(
 | 
			
		||||
          icon: const Icon(Symbols.help, color: Color(0xFF5F6368)),
 | 
			
		||||
          onPressed: () {
 | 
			
		||||
            launchUrlString('https://kb.solsynth.dev');
 | 
			
		||||
          },
 | 
			
		||||
        ),
 | 
			
		||||
        const Gap(12),
 | 
			
		||||
        const Gap(8),
 | 
			
		||||
      ],
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user