Difference between revisions of "Flutter"

From RHS Wiki
Jump to navigation Jump to search
m
Tag: visualeditor
Tag: visualeditor
Line 10: Line 10:
 
<br />
 
<br />
  
== Built Value Android Studio Live Templates ==
+
==Built Value Android Studio Live Templates==
 
File > Settings > Editor > Live Templates
 
File > Settings > Editor > Live Templates
  
* Abbreviation blth
+
=== Built Value Header ===
* Description Built Value Header
+
 
 +
*Abbreviation blth
 +
*Description Built Value Header
 
<syntaxhighlight lang="dart">
 
<syntaxhighlight lang="dart">
 
library $LIBRARY$;
 
library $LIBRARY$;
Line 23: Line 25:
  
 
part '$LIBRARY$.g.dart';
 
part '$LIBRARY$.g.dart';
 +
</syntaxhighlight>
 +
 +
=== Built Value ===
 +
 +
* Abbreviation blt
 +
* Description Built Value
 +
<syntaxhighlight lang="dart">
 +
abstract class $NAME$ implements Built<$NAME$, $NAME$Builder> {
 +
  // fields go here
 +
 
 +
  $NAME$._();
 +
 
 +
  factory $NAME$([updates($NAME$Builder b)]) = _$$$NAME$;
 +
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 08:37, 22 October 2019

Flutter

Install


Built Value Android Studio Live Templates

File > Settings > Editor > Live Templates

Built Value Header

  • Abbreviation blth
  • Description Built Value Header
library $LIBRARY$;
import 'dart:convert';
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';

part '$LIBRARY$.g.dart';

Built Value

  • Abbreviation blt
  • Description Built Value
abstract class $NAME$ implements Built<$NAME$, $NAME$Builder> {
  // fields go here
  
  $NAME$._();
  
  factory $NAME$([updates($NAME$Builder b)]) = _$$$NAME$;
}