-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreen.dart
More file actions
29 lines (25 loc) · 759 Bytes
/
Copy pathscreen.dart
File metadata and controls
29 lines (25 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import 'dart:html';
import 'package:flutter/material.dart';
//membuat class HelloScreen turunan dari Statefilwidget
class HelloScreen extends StatefulWidget {
//cons class menggunakan parameter key
const HelloScreen({super.key});
@override
State<HelloScreen> createState() => _MyWidgetState();
}
class _MyWidgetState extends State<HelloScreen> {
Widget build(BuildContext context) {
var box = Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [Colors.green, Colors.indigo]),
),
// color: Colors.red,
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
child: Text('Hallo Firsta'),
);
return Scaffold(
body: box,
);
}
}