Advertisement
rajath_pai

flutter 3

Jul 23rd, 2021
1,533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.38 KB | None | 0 0
  1. import '../flutter_flow/flutter_flow_theme.dart';
  2. import '../flutter_flow/flutter_flow_util.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:google_fonts/google_fonts.dart';
  5.  
  6. class HomePageWidget extends StatefulWidget {
  7.   HomePageWidget({Key key}) : super(key: key);
  8.  
  9.   @override
  10.   _HomePageWidgetState createState() => _HomePageWidgetState();
  11. }
  12.  
  13. class _HomePageWidgetState extends State<HomePageWidget> {
  14.   bool switchListTileValue;
  15.   final scaffoldKey = GlobalKey<ScaffoldState>();
  16.  
  17.   @override
  18.   Widget build(BuildContext context) {
  19.     return Scaffold(
  20.       key: scaffoldKey,
  21.       appBar: AppBar(
  22.         backgroundColor: Colors.black,
  23.         automaticallyImplyLeading: true,
  24.         actions: [],
  25.         centerTitle: true,
  26.         elevation: 4,
  27.       ),
  28.       drawer: Drawer(
  29.         elevation: 16,
  30.       ),
  31.       body: SafeArea(
  32.         child: SwitchListTile(
  33.           value: switchListTileValue ?? true,
  34.           onChanged: (newValue) =>
  35.               setState(() => switchListTileValue = newValue),
  36.           title: Text(
  37.             'Enable Bluetooth',
  38.             style: FlutterFlowTheme.subtitle2.override(
  39.               fontFamily: 'Poppins',
  40.             ),
  41.           ),
  42.           tileColor: Color(0xFFF5F5F5),
  43.           dense: false,
  44.           controlAffinity: ListTileControlAffinity.trailing,
  45.         ),
  46.       ),
  47.     );
  48.   }
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement