mnemo_cards/lib/widgets/switch_button.dart
2024-06-15 18:42:18 +03:00

26 lines
641 B
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mnemo_cards/theme/themes.dart';
class SwitchButton extends StatelessWidget {
final bool value;
final void Function(bool)? onChanged;
SwitchButton({
required this.value,
required this.onChanged,
});
@override
Widget build(BuildContext context) {
return Switch(
value: value,
onChanged: onChanged,
activeColor: progressBlue,
activeTrackColor: white,
inactiveTrackColor: white,
trackOutlineColor: WidgetStatePropertyAll(borderGray),
inactiveThumbColor: borderGray,
);
}
}