Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to disable switch in flutter

// To disable your Switch, edit its onChanged method to null like this

Switch(
  onChanged: null,
  value: true,
  inactiveThumbColor: Colors.tealAccent,
  inactiveTrackColor: Colors.tealAccent.withOpacity(0.5),
  // ...
),
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #switch #flutter
ADD COMMENT
Topic
Name
3+6 =