m3_lightmeter/lib/screens/settings/components/haptics_tile.dart

28 lines
639 B
Dart
Raw Normal View History

2022-10-30 18:59:33 +00:00
import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
class HapticsListTile extends StatefulWidget {
const HapticsListTile({super.key});
@override
State<HapticsListTile> createState() => _HapticsListTileState();
}
class _HapticsListTileState extends State<HapticsListTile> {
bool _value = false;
@override
Widget build(BuildContext context) {
return SwitchListTile(
secondary: const Icon(Icons.vibration),
title: Text(S.of(context).haptics),
value: _value,
onChanged: (value) {
setState(() {
_value = value;
});
},
);
}
}