I need to customize the switch button in flutter
问题 this is flutter switch button: - I want this design: - 回答1: You can use package https://pub.dev/packages/custom_switch or fork it and modify to your full code import 'package:custom_switch/custom_switch.dart'; import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, theme: ThemeData( primarySwatch: Colors.deepOrange ), home: HomeScreen(), )