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:math' as math; | |
import 'package:flutter/rendering.dart'; | |
class SliverGridDelegateWithFixedMainAxisExtent extends SliverGridDelegate { | |
/// Creates a delegate that makes grid layouts with tiles that have a fixed | |
/// main axis extent and a minimum cross axis extent. This delegate will | |
/// attempt to fit as many items as possible in the cross axis while respecting | |
/// the minimum width. | |
/// |
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
adb devices | |
$screenSize = adb shell wm size | |
$sizeMatches = [regex]::match($screenSize, '(\d+)x(\d+)') | |
$screenHeight = $sizeMatches.Groups[2].Value | |
$screenWidth = $sizeMatches.Groups[1].Value | |
$recordHeight = $screenHeight / 2 | |
$recordWidth = $screenWidth / 2 | |
$recordingSize = "${recordWidth}x${recordHeight}" | |
$recordingName = "recording_" + [DateTimeOffset]::Now.ToUnixTimeSeconds() + ".mp4" | |
$recordingPath = "/sdcard/${recordingName}" |
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
// my_feature.dart | |
class MyFeatureLauncher { | |
final _factory = di<MyFeatureBlocFactory>(); | |
void show(BuildContext context) { | |
Navigator.of(context).push(MaterialPageRoute( | |
settings: RouteSettings(name: '/my-feature'), | |
builder: (context) => BlocProvider( | |
block: _factory.init(diCon<Strings>(context)), |
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
#set( $nameparts = $NAME.split("_")) | |
#set( $namepart = '') | |
#set( $classname = '') | |
#foreach( $namepart in $nameparts ) | |
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1)) | |
#end | |
import 'package:flutter/material.dart'; | |
class $classname extends StatelessWidget { |
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
#set( $nameparts = $NAME.split("_")) | |
#set( $namepart = '') | |
#set( $classname = '') | |
#foreach( $namepart in $nameparts ) | |
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1)) | |
#end | |
import 'package:flutter/material.dart'; | |
class $classname extends StatefulWidget { |
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
#set( $nameparts = $NAME.split("_")) | |
#set( $namepart = '') | |
#set( $classname = '') | |
#foreach( $namepart in $nameparts ) | |
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1)) | |
#end | |
import 'package:json_annotation/json_annotation.dart'; | |
part #[[']]#$NAME#[[.g.dart']]#; |
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
#set( $nameparts = $NAME.split("_")) | |
#set( $namepart = '') | |
#set( $classname = '') | |
#foreach( $namepart in $nameparts ) | |
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1)) | |
#end | |
class $classname { | |
// TODO: add class properties and methods |
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
#set( $nameparts = $NAME.split("_")) | |
#set( $namepart = '') | |
#set( $classname = '') | |
#foreach( $namepart in $nameparts ) | |
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1)) | |
#end | |
class $classname { | |
// TODO: add class properties and methods |