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
| // (6) set value to drop down here | |
| dev.log('goto page with docId = $value'); | |
| snapshot.data!.docs.where((e) => e.id == value).forEach((e) { | |
| dev.log('${e.data()}'); | |
| setState(() { | |
| dropdownValue = value.toString(); | |
| // set your value here | |
| dev.log(e["timestamp"]); | |
| }); | |
| }); |
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
| // show dropdown | |
| Center( | |
| child: Container( | |
| height: 50, | |
| padding: const EdgeInsets.only( | |
| left: 10.0, | |
| right: 10.0, | |
| ), | |
| decoration: BoxDecoration( | |
| borderRadius: BorderRadius.circular(50.0), |
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
| // get log history | |
| FutureBuilder( | |
| future: FirebaseFirestore.instance.collection('sick').doc(widget.idcard).collection('logs').get(), | |
| builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) { | |
| if (snapshot.hasError) { | |
| return Text('Error: ${snapshot.error}'); | |
| } | |
| if (!snapshot.hasData) { | |
| return Text('Loading...'); |
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
| What's new in Flutter 3 ? | |
| =========== | |
| - Fully support 6 platforms iOS, Android, Web, macOS, Linux, Windows | |
| - Flutter SDK on macOS now support ARM M1 and x86 | |
| - macOS desktop app, usecase from SuperList | |
| - Flutter for Web has a better performance aka List/Scroll |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.4; | |
| import "@openzeppelin/contracts@4.6.0/token/ERC20/utils/SafeERC20.sol"; | |
| import "@openzeppelin/contracts@4.6.0/token/ERC20/ERC20.sol"; | |
| contract GIFT is ERC20 { | |
| using SafeERC20 for ERC20; | |
| constructor() ERC20("GIFT Token", "GIFT") { | |
| _mint(msg.sender, 1000000000 * 10 ** decimals()); |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.4; | |
| import "@openzeppelin/contracts@4.6.0/token/ERC20/utils/SafeERC20.sol"; | |
| import "@openzeppelin/contracts@4.6.0/token/ERC20/ERC20.sol"; | |
| contract SWAPToken { | |
| using SafeERC20 for ERC20; |
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
| // SPDX-License-Identifier: MIT | |
| // Author: Jacob Suchorabski | |
| pragma solidity >= 0.7.0 <= 0.7.4; | |
| contract Faucet{ | |
| address owner; | |
| mapping (address => uint) timeouts; | |
| event Withdrawal(address indexed to); |
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
| .. | |
| location / { | |
| # First attempt to serve request as file, then | |
| # as directory, then fall back to displaying a 404. | |
| #try_files $uri $uri/ =404; | |
| proxy_pass http://localhost:3000/; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "Upgrade"; | |
| } |
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
| #/etc/systemd/system/marsd.service | |
| [Unit] | |
| Description=Mars Node | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| User=root | |
| WorkingDirectory=/root | |
| ExecStart=/root/go/bin/marsd start -- |
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
| #!/bin/bash | |
| cd /root/mars/vue | |
| npm run dev |