import 'package:flutter/material.dart';
import 'package:rkm/config/color_palette.dart';
import 'package:rkm/widgets/text_default.dart';

class SwitchWithSubtitle extends StatelessWidget {
  double width;
  bool value;
  var onChanged;
  String title;

  SwitchWithSubtitle({
    required this.onChanged,
    required this.value,
    required this.width,
    required this.title
});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: width,
      child: Row(
        children: [
          TextDefault(text: title,color: ColorPalette.black54,fontSize: 18),
          Spacer(),
          Switch(
              value: value,
              onChanged:onChanged
          )
        ],
      ),
    );
  }
}
