reduced SwitchListTile.contentPadding

This commit is contained in:
Vadim 2023-07-09 12:57:46 +02:00
parent 59f8267391
commit c7d92cc105
3 changed files with 6 additions and 0 deletions

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/res/dimens.dart';
import 'package:lightmeter/screens/settings/components/general/components/caffeine/bloc_list_tile_caffeine.dart';
@ -15,6 +16,7 @@ class CaffeineListTile extends StatelessWidget {
title: Text(S.of(context).keepScreenOn),
value: state,
onChanged: context.read<CaffeineListTileBloc>().onCaffeineChanged,
contentPadding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM),
),
);
}

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/res/dimens.dart';
import 'package:lightmeter/screens/settings/components/general/components/haptics/bloc_list_tile_haptics.dart';
@ -15,6 +16,7 @@ class HapticsListTile extends StatelessWidget {
title: Text(S.of(context).haptics),
value: state,
onChanged: context.read<HapticsListTileBloc>().onHapticsChanged,
contentPadding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM),
),
);
}

View file

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:lightmeter/data/models/dynamic_colors_state.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/providers/theme_provider.dart';
import 'package:lightmeter/res/dimens.dart';
import 'package:lightmeter/utils/inherited_generics.dart';
class DynamicColorListTile extends StatelessWidget {
@ -14,6 +15,7 @@ class DynamicColorListTile extends StatelessWidget {
title: Text(S.of(context).dynamicColor),
value: context.listen<DynamicColorState>() == DynamicColorState.enabled,
onChanged: ThemeProvider.of(context).enableDynamicColor,
contentPadding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM),
);
}
}