Created
September 11, 2025 09:17
-
-
Save Dieterbe/929e4a581ed7fccd76354531c1299a7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
/// Flutter code sample for [Switch]. | |
void main() => runApp(const SwitchApp()); | |
class SwitchApp extends StatelessWidget { | |
const SwitchApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
appBar: AppBar(title: const Text('Switch Sample')), | |
body: Row( | |
children: [ | |
Text("some text"), | |
Switch(value: true, onChanged: (bool value) {}), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment