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 'dart:ui'; | |
| void main() => runApp(new QuoteApp()); | |
| class QuoteApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return new MaterialApp( | |
| title: 'Motivational Quote App', |
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 'dart:ui'; | |
| void main() { | |
| runApp(new MaterialApp( | |
| title: 'Motivational Quote App', | |
| home: new QuoteApp(), | |
| )); | |
| } |
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
| /* #add below fonts section to bottom of your pubspec.yaml file. Note: you have to create directory and add fonts. If your directory structure and fonts are different change below lines to yours | |
| fonts: | |
| - family: Gaegu | |
| fonts: | |
| - asset: assets/fonts/Gaegu-Light.ttf | |
| weight: 200 | |
| - asset: assets/fonts/Gaegu-Regular.ttf | |
| weight: 500 | |
| - family: Tajawal |
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'; | |
| void main() => runApp(LimeApp()); | |
| class LimeApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Lime', | |
| theme: ThemeData( |
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'; | |
| void main() => runApp(LimeApp()); | |
| class LimeApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Lime', | |
| home: MainPage(), |
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
| main(List<String> arguments) { | |
| Person person1 = new Person('John', age: 26, address: 'NY'); | |
| Person person2 = new Person('Lily', isMale: false, address: 'CA'); | |
| print('${person1.name} is ${person1.age} years old and he/she is living in ${person1.address}'); | |
| print('${person2.name} is ${person2.age} years old and he/she is living in ${person2.address}'); | |
| } | |
| class Person { |
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
| //Dart | |
| main(List<String> arguments) { | |
| List<String> carriers = ['web', 'mobile', 'desktop']; | |
| print('''${carriers.join(', ') | |
| .toUpperCase()} developer'''); | |
| } | |
| //Java | |
| // import java.util.Arrays; | |
| // import java.util.List; |
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 java.util.Arrays; | |
| import java.util.List; | |
| import static java.util.stream.Collectors.*; | |
| class Main { | |
| public static void main(String[] arg) { | |
| List<String> cities = Arrays.asList("NY", "LA", "Tokyo"); | |
| System.out.println(cities.stream().collect(joining(", "))); | |
| } | |
| } |
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
| //problem | |
| main(List<String> arguments) { | |
| List cities = ['NY', 'LA', 'Tokyo']; | |
| String s = ''; | |
| for(var city in cities) | |
| s += '$city, '; | |
| print(s);//NY, LA, Tokyo, | |
| } | |
| // first method |