Skip to content

Instantly share code, notes, and snippets.

@Sumit-Ghosh
Created February 15, 2022 04:30
Show Gist options
  • Save Sumit-Ghosh/2b7a54099cf03264df347964c54123fe to your computer and use it in GitHub Desktop.
Save Sumit-Ghosh/2b7a54099cf03264df347964c54123fe to your computer and use it in GitHub Desktop.
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class LoginScreen extends StatelessWidget {
const LoginScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Login")),
body: _buildScaffoldBody(),
);
}
Widget _buildScaffoldBody() {
return SizedBox(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Text("This will change on button tap"),
const SizedBox(
height: 16,
),
TextButton(
onPressed: () {
// Will do Something interesting
},
child: const Text("Tap me!!!"))
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment