Skip to content

Instantly share code, notes, and snippets.

@CoderJava
Created May 7, 2020 16:02
Show Gist options
  • Select an option

  • Save CoderJava/6997b4ea2aedc9157bb5a6259072225a to your computer and use it in GitHub Desktop.

Select an option

Save CoderJava/6997b4ea2aedc9157bb5a6259072225a to your computer and use it in GitHub Desktop.
Widget Padding
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Demo'),
),
body: Padding(
padding: EdgeInsets.only(top: 24.0),
child: Text(
'Hello World',
style: TextStyle(
color: Colors.blue,
fontSize: 48.0,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
shadows: <Shadow>[
Shadow(
offset: Offset(5.0, 2.0),
),
],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment