Date: 01-12-2021 Author: Harshvardhan Joshi
- flutter installed & accessible from cmd
- python3 installed & accessible from cmd
- navigate to directory that contains multiple flutter projects
| Future<void> _showDemoPage(BuildContext context, String url) async { | |
| final parameters = await Navigator.of(context).push( | |
| MaterialPageRoute( | |
| builder: (context) => CustomWebView( | |
| initialUrl: url, | |
| ), | |
| ), | |
| ); | |
| print('AppHome: _showDemoPage: parameters: $parameters'); |
| workflows: | |
| ios-workflow: | |
| name: iOS Workflow | |
| max_build_duration: 30 | |
| environment: | |
| vars: | |
| XCODE_WORKSPACE: "Runner.xcworkspace" | |
| XCODE_SCHEME: "Runner" | |
| # https://docs.codemagic.io/code-signing-yaml/signing-ios/ | |
| # Put your bundle id here |
| /** | |
| * Utility class for access to runtime permissions. | |
| */ | |
| public abstract class PermissionUtils { | |
| /** | |
| * Requests the fine location permission. If a rationale with an additional explanation should | |
| * be shown to the user, displays a dialog that triggers the request. | |
| */ | |
| public static void requestPermission(AppCompatActivity activity, int requestId, |
| import 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } |
| function conditionalFormatting(value) { | |
| var input = Math.abs(value) | |
| var formatLegth = 2; | |
| if(input == 0) { | |
| formatLegth = 2; | |
| } else if(input > 0 && input <= 1) { | |
| formatLegth = 4; | |
| } else if(input > 1 && input <= 10) { | |
| formatLegth = 3; |
| import 'package:flutter/material.dart'; | |
| class PaginationView extends StatefulWidget { | |
| final int maxCountPerPage; | |
| final int totalCount; | |
| final Widget Function(BuildContext context, int start, int end) builder; | |
| final VoidCallback? onNext; | |
| final VoidCallback? onPrevious; |
| import 'package:flutter/material.dart'; | |
| // Add this to pubspec.yaml of your flutter project | |
| // palette_generator: ^0.3.2 | |
| // get packages to download the package | |
| import 'package:palette_generator/palette_generator.dart'; | |
| /// This method will find & return the most dominant color from the image |
| import 'package:async/async.dart'; | |
| import 'package:dartz/dartz.dart'; | |
| /// Pub Packages if not already install | |
| /// | |
| /// # Utility Extensions to existing dart classes & methods | |
| /// dartz: ^0.10.1 | |
| /// | |
| /// # Asynchronous Operation Utilities | |
| /// async: ^2.8.1 |
| void main() { | |
| /// Mock list of contacts | |
| final _rawContacts = [ | |
| // Actual Number: 9000000000 | |
| "+919000000000", | |
| "+9190000 00000", | |
| "+91900-000-0000", | |
| "919000000000", | |
| "9190000 00000", | |
| "91900-000-0000", |