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-ChildItem -Path "D:\Projects\Flutter" -Directory | ForEach-Object { | |
| Write-Host $_.FullName | |
| Set-Location $_.FullName | |
| flutter clean | |
| } |
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
| int asInt(Map<String, dynamic>? json, String key, {int defaultValue = 0}) { | |
| if (json == null || !json.containsKey(key)) return defaultValue; | |
| var value = json[key]; | |
| if (value == null) return defaultValue; | |
| if (value is int) return value; | |
| if (value is double) return value.toInt(); | |
| if (value is bool) return value ? 1 : 0; | |
| if (value is String) return int.tryParse(value) ?? double.tryParse(value)?.toInt() ?? defaultValue; | |
| return defaultValue; |
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
| Column( | |
| children: [ | |
| IconButton( | |
| icon: ShaderMask( | |
| shaderCallback: (bounds) => LinearGradient( | |
| begin: Alignment.centerLeft, | |
| colors: [ | |
| Colors.orange.shade100, | |
| Colors.orange.shade900, | |
| ], |
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 'dart:collection'; | |
| import 'package:flutter/material.dart'; | |
| class Observer { | |
| Observer._(); | |
| static final _RouteObserverC route = _RouteObserverC(); | |
| } |
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
| bool isDisabled = false; | |
| showModalBottomSheet( | |
| context: context, | |
| isScrollControlled: true, | |
| backgroundColor: Colors.transparent, | |
| builder: (_) => StatefulBuilder( | |
| builder: (_, state) { | |
| final int itemsLength = 5; | |
| double newRate = ((37 + (itemsLength * 50)) / | |
| (MediaQuery.of(context).size.height - |