Posts

Showing posts from 2018

Android Studio showing red alerts while gradle compile succeeds

This can happen when you change your gradle distribution. Clean build does succeed but the IDE still shows some missing import. One solution from Android Studio: Go to File | Invalidate Cache/Restart | Invalidate and Restart

Fixing blank developer tools windows Edge

I recently started developing again on Windows (after 10 years on Ubuntu) after getting a PC with Windows 10 installed on it. As a dart developer the first thing I did was to try some web apps on Edge...trying to get console..F12..nothing, just the screen split in 2 with a blank/grey windows on the right. After digging I found a solution deep in the following issue . Start a power shell console in administrative mode than use the following command: Add-AppxPackage -register "C:\windows\SystemApps\Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe\AppxManifest.xml" -DisableDevelopmentMode -Confirm:$false Restart Edge, press F12, that's it!

Cannot close bracket on Intellij IDEA (and WebStorm) with a French Keyboard

It was impossible for me to enter the '}' sign on Intellij IDEA and WebStorm with my French keyboard. The solution was to look for any keyboard shortcut associated to it: Settings | KeyMap then look for a given shortcut by pressing the magnifying classes (find action by shortcut) to find the culprit shortcut (in my case Ctrl + Alt + =) and simply removing this shortcut

Fixing iOS build for Flutter

This is for the current first Beta version of Flutter Flutter build remains a nightmare as a primary linux user, especially for iOS, that I don't use enough to get used to so where all the tools installed are always obsolete when I come back My recent fix for Cocoapods If brew install cocoapods pod update gives pod --version /usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.4.0/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory /usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.4.0/libexec/bin/pod: Undefined error: 0 Try gem install -n /usr/local/bin cocoapods Then flutter run flutter run --preview-dart-2 should work

build_value dart setup

A quick note to remind me how to use build_value package (2.0.0-dev) Example here using json serialization Add json_serializable dependency Add build_runner dependency (dev) dependencies: json_serializable: any dev_dependencies: build_runner: "=>0.7.8" Create 'example/model/basic.dart'. All sections are needed here (library, import, part, annotation) library my_library.basic; import 'package:json_annotation/json_annotation.dart'; part 'basic.g.dart'; @JsonSerializable() class Basic String name; } Build # create alias once alias br='pub run build_runner' # build br build to see file generated (basic.g.dart) From then you can add option (fromJson, toJson) @JsonSerializable(includeIfNull: false) class Basic extends Object with _$BasicSerializerMixin { String name; Basic(); factory Basic.fromJson(Map<String, dynamic> json) => _$BasicFromJson(json); }