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:flutter/material.dart'; | |
| import 'package:scoped_model/scoped_model.dart'; | |
| import 'package:flutter_global_variable/scoped_models/main.dart'; | |
| class Page3 extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| backgroundColor: Colors.white, |
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:flutter/material.dart'; | |
| import 'package:scoped_model/scoped_model.dart'; | |
| import 'package:flutter_global_variable/scoped_models/main.dart'; | |
| import 'package:flutter_global_variable/pages/page3.dart'; | |
| class Page2 extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| backgroundColor: Colors.white, |
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:flutter/material.dart'; | |
| import 'package:scoped_model/scoped_model.dart'; | |
| import 'package:flutter_global_variable/scoped_models/main.dart'; | |
| import 'package:flutter_global_variable/pages/page2.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { |
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: | |
| flutter: | |
| sdk: flutter | |
| # The following adds the Cupertino Icons font to your application. | |
| # Use with the CupertinoIcons class for iOS style icons. | |
| cupertino_icons: ^0.1.2 | |
| scoped_model: ^1.0.1 |
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 React, { Component } from 'react'; | |
| import Dropzone from 'react-dropzone'; | |
| import csv from 'csv'; | |
| class App extends Component { | |
| onDrop(files) { | |
| this.setState({ files }); |
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
| func isPalindrome(inputString: String) -> Bool { | |
| let stringLength = inputString.count | |
| var position = 0 | |
| while position < stringLength / 2 { | |
| let startIndex = inputString.index(inputString.startIndex, offsetBy: position) | |
| let endIndex = inputString.index(inputString.endIndex, offsetBy: -position - 1) | |
| if inputString[startIndex] == inputString[endIndex] { | |
| position += 1 |
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
| Widget _buildListItem(BuildContext context, Record record) { | |
| ... | |
| onTap: () { | |
| Navigator.push( | |
| context, MaterialPageRoute(builder: (context) => new DetailPage(record: record))); | |
| }, | |
| ), | |
| ), | |
| ); | |
| } |
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:url_launcher/url_launcher.dart'; | |
| class URLLauncher { | |
| launchURL(String url) async { | |
| if (await canLaunch(url)) { | |
| await launch(url); | |
| } else { | |
| throw 'Could not launch $url'; | |
| } |
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: | |
| flutter: | |
| sdk: flutter | |
| cupertino_icons: ^0.1.2 | |
| url_launcher: ^4.0.3 // ← |
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:flutter/material.dart'; | |
| import 'models/Record.dart'; | |
| // 1 | |
| class DetailPage extends StatelessWidget { | |
| final Record record; | |
| // 2 | |
| DetailPage({this.record}); | |
| @override |