Skip to content

SettingsTile trailing widget not appearing on Web #180

@guskuma

Description

@guskuma

When using SettingsTile on web trailing widget is not shown.

my code:

return SettingsList(
                  applicationType: ApplicationType.material,
                  // platform: DevicePlatform.android,
                  sections: [
                    SettingsSection(
                      title: Text(
                        'Integrações',
                        style: Theme.of(context).textTheme.labelLarge,
                      ),
                      tiles: <SettingsTile>[
                        SettingsTile(
                          leading: const Icon(Icons.calendar_month_outlined),
                          title: const Text('Google Calendar'),
                          description: const Text('Você precisa autorizar o app Agente WSP a acessar sua agenda'),
                          trailing: FilledButton(
                            onPressed: () async {
                              if(!_isWaiting) {
                                _isWaiting = true;
                                var result = await FirebaseFunctions.instance.httpsCallable('getAuthURL').call();
                                launchUrl(
                                    Uri.parse(result.data),
                                    mode: LaunchMode.externalApplication
                                );
                              }
                            },
                            child: const Text('Autorizar'),
                          ),
                        ),
                        SettingsTile.switchTile(
                          onToggle: (value) {
                            context.read<UserPreferencesProvider>().savePreference('whatsAppDesktopEnabled', value);
                          },
                          initialValue: context.watch<UserPreferencesProvider>().preferences!.whatsAppDesktopEnabled,
                          leading: const Icon(FontAwesomeIcons.squareWhatsapp),
                          title: const Text('WhatsApp Desktop'),
                          description: const Text('Na versão Web, cria links para o WhatsApp Desktop'),
                        ),
                      ],
                    ),
                    SettingsSection(
                      title: Text(
                          'Gerenciamento',
                          style: Theme.of(context).textTheme.labelLarge,
                      ),
                        tiles: [
                          SettingsTile.navigation(
                            title: const Text('Números de WhatsApp'),
                            leading: const Icon(FontAwesomeIcons.whatsapp),
                          ),
                          SettingsTile.navigation(
                            title: const Text('Dispositivos'),
                            leading: const Icon(FontAwesomeIcons.mobileScreenButton),
                          ),
                    ])
                  ],
                );

android screen:
Screenshot_20230614_122431

web screen:
ksnip_20230614-122840

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions