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
| // accesing and requesting | |
| Future<List<Directory>?>? _externalStorageDirectory; // this will go in future in future builder | |
| // this will go in onPresssed if you wanna use button to request everything | |
| void requestExternalStorageDirectory(StorageDirectory type) { |
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
| void main(){ | |
| while (true) { | |
| print("Rock, Paper, Scissors Shoot!"); | |
| String playerMove = getPlayerMove(); | |
| if (playerMove == "Quit") { | |
| return; | |
| } | |
| print("You played $playerMove"); |
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
| // Model for Json DATA | |
| class Posts { | |
| Posts({ | |
| required this.userId, | |
| required this.id, | |
| required this.title, | |
| required this.body, | |
| }); | |
| late final int userId; |
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
| // The main maethod (just return the widget name to fetch the data from different methods) | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutterx/demo.dart'; | |
| import 'package:flutterx/photos.dart'; | |
| void main() { | |
| runApp(const Experiment()); | |
| } |
NewerOlder