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
// | |
// ViewController.swift | |
// dekontaminasi | |
// | |
// Created by Ihwan ID on 24/09/20. | |
// | |
import UIKit | |
class ViewController: UIViewController { |
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
struct StatsResponse: Codable { | |
let regions: [Province] | |
let numbers: Numbers | |
let timestamp: Int | |
let name: String | |
let type: String | |
} | |
struct Province: Codable { | |
let type: String |
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
{ | |
"type": "country", | |
"name": "Indonesia", | |
"timestamp": 1600819200000, | |
"numbers": { | |
"infected": 257388, | |
"recovered": 187958, | |
"fatal": 9977 | |
}, | |
"regions": [ |
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
// | |
// ViewController.swift | |
// simple-table-view | |
// | |
// Created by Ihwan ID on 06/09/20. | |
// Copyright © 2020 Ihwan ID. All rights reserved. | |
// | |
import UIKit |
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
extension ViewController: UITableViewDataSource, UITableViewDelegate{ | |
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
return 15 | |
} | |
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
let cell = UITableViewCell() | |
cell.textLabel?.text = "Cell at \(indexPath.row+1)" | |
return cell | |
} |
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'; | |
class CustomTextField extends StatelessWidget { | |
final TextEditingController controller; | |
final String labelText; | |
final bool isObscureText; | |
final Function(String) onChanged; | |
CustomTextField( | |
{this.controller, | |
this.labelText, |
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:fluttercallback/common/action_button.dart'; | |
import 'package:fluttercallback/common/custom_text_field.dart'; | |
import 'package:fluttercallback/common/switch_button.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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'; | |
class Loading extends StatelessWidget { | |
final String msg; | |
Loading({this.msg}); | |
@override | |
Widget build(BuildContext context) { | |
return Center( |
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:pinjollist/model/company.dart'; | |
import 'package:url_launcher/url_launcher.dart'; | |
class CompanyModal extends StatelessWidget { | |
final Company company; | |
CompanyModal({this.company}); | |
@override | |
Widget build(BuildContext context) { | |
return Container( |