Skip to content

Instantly share code, notes, and snippets.

@perymerdeka
Created June 27, 2021 06:33
Show Gist options
  • Save perymerdeka/8dda5c45a08f42d128873b4780d150b9 to your computer and use it in GitHub Desktop.
Save perymerdeka/8dda5c45a08f42d128873b4780d150b9 to your computer and use it in GitHub Desktop.
explain Text widget in Flutter Application
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Image View App'),
),
body: Center(
child: Container(
color: Colors.deepPurple,
width: 200,
height: 150,
child: Text('This is a Text Widget Text'),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment