This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flame/game.dart'; | |
| import 'package:flutter/material.dart'; | |
| class GameplayScreen extends StatelessWidget { | |
| const GameplayScreen({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| body: GameWidget( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:droplets/screen/gameplay.dart'; | |
| import 'package:flutter/material.dart'; | |
| class HomeScreen extends StatefulWidget { | |
| const HomeScreen({super.key}); | |
| @override | |
| State<HomeScreen> createState() => _HomeScreenState(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:droplets/screen/homescreen.dart'; | |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'com.google.gms.google-services' | |
| apply plugin: 'com.google.firebase.crashlytics' | |
| android { | |
| compileSdkVersion 31 | |
| ... | |
| defaultConfig { | |
| applicationId "com.dicoding.ditonton" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Container( | |
| height: 2*50, //100 | |
| width : sqrt(3)* 50, //86.602 | |
| child: CustomPaint( | |
| painter: HexagonPainter(), | |
| child; Container(), | |
| ), | |
| ), | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PolygonPainter extends CustomPainter { | |
| @override | |
| void paint(Canvas canvas, Size size) { | |
| // We'll draw here | |
| } | |
| @override | |
| bool shouldRepaint(CustomPainter oldDelegate) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CustomPaint( | |
| painter: PolygonPainter(), | |
| child: Container() | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dependencies: | |
| // 1 tab spacing | |
| flutter: | |
| // 2 tab spacing | |
| sdk: flutter | |
| // 1 tab spacing | |
| cupertino_icons: ^1.0.2 | |
| // NEW PACKAGE HERE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: <project name> | |
| description: A new Flutter project. | |
| publish_to: 'none' | |
| version: 1.0.0+1 | |
| environment: | |
| sdk: ">=2.7.0 <3.0.0" |
NewerOlder