Building adaptive apps from Flutter docs
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); |
#!/bin/sh | |
echo "========== Cleanup start ==========" | |
rm -Rf ios/Pods | |
rm -Rf ios/.symlink | |
rm -Rf ios/Flutter/Flutter.framework | |
rm -Rf ios/Flutter/Flutter.podspec | |
rm -rf ios/Podfile.lock | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* -y | |
rm -rf pubspec.lock | |
flutter clean |
rm -f ios/Podfile ios/Podfile.lock pubspec.lock && rm -rf ios/Runner.xcworkspace/xcshareddata/ && | |
flutter clean && | |
flutter pub cache repair && | |
rm -f ios/Podfile ios/Podfile.lock pubspec.lock && | |
flutter pub get && | |
flutter pub run build_runner clean |
import 'package:flutter/material.dart'; | |
/// An implicitly animated builder that tweens from 0.0 to 1.0 based on `isActive` property | |
class ImplicitlyAnimatedBuilder extends ImplicitlyAnimatedWidget { | |
ImplicitlyAnimatedBuilder({ | |
Key key, | |
@required Curve curve, | |
@required Duration duration, | |
@required this.isActive, | |
@required this.builder, |
import 'package:flutter/material.dart'; | |
void main() => runApp(NeumorphicApp()); | |
class NeumorphicApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Neumorphic App', | |
theme: ThemeData( |
// MIT License | |
// | |
// Copyright (c) 2019 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
import { Injectable } from '@angular/core'; | |
import { | |
ActivatedRouteSnapshot, | |
CanActivate, | |
Router, | |
RouterStateSnapshot, | |
} from '@angular/router'; | |
import { Observable } from 'rxjs'; | |
import { map } from 'rxjs/operators'; |
Do you have an awesome application written with Angular v7 using NgRx v7, but have been feeling left out will all the mentions online and at conferences about Angular v8 and NgRx v8? Well you are in luck! Today we will explore together, how to upgrade our applications to use Angular v8 using the Angular CLI tooling. We will also explore upgrading to NgRx v8. This will allow us to take advantage of the new features provided in NgRx v8. Included with NgRx v8 is a shiny set of creators, or type-safe factory functions, for actions, effects, and reducers.
The Angular team has provided a great website that walks through the process of upgrading in-depth. This website can be found at Angular Update Tool. We will touch on some of the information today.
import 'package:flutter/gestures.dart' show DragStartBehavior; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; | |
void main() { | |
runApp( | |
MaterialApp( | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
primaryColor: Colors.indigo, |