This file contains 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
//wrap the layout widget for the screen with a Gesture detector having this function | |
GestureDetector( | |
onTap: () { | |
FocusScopeNode currentFocus = FocusScope.of(context); | |
if (!currentFocus.hasPrimaryFocus) { | |
currentFocus.unfocus(); | |
} | |
}, |
This file contains 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
//View #1 Pass any object as an argument in the Navigator as part of a Map: | |
void _editItem(BuildContext context, int index, Box<ChecklistItem> box) { | |
ChecklistItem _selectedItem = box.getAt(index) as ChecklistItem; | |
Navigator.pushNamed(context, ChecklistEditScreen.id, | |
arguments: {'item': _selectedItem}); | |
} | |
//View #2 Extract passed flutter arguments without passing them as parameters: | |
Widget build(BuildContext context) { |
This file contains 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
void _rebuildAllChildren(BuildContext context) { | |
void rebuild(Element el) { | |
el.markNeedsBuild(); | |
el.visitChildren(rebuild); | |
} | |
(context as Element).visitChildren(rebuild); | |
} |
This file contains 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
return Dismissible( | |
key: Key(index.toString()), | |
onDismissed: (direction) { | |
showDialog( | |
context: context, | |
barrierDismissible: false, | |
builder: (_) => AlertDialog( | |
content: Text( | |
"Do you want to delete task ${currentItem.title}?", | |
), |
This file contains 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
// | |
// MNGStreamReaderWriter.swift | |
// ths | |
// | |
// Created by Tommie N. Carter, Jr., MBA on 2/14/16. | |
// Copyright © 2016 MING Technology. All rights reserved. | |
// | |
import Foundation | |
import Darwin.Mach.mach_time |
This file contains 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 whichFile to choose file with multiple selections allowed | |
repeat with aFile in whichFile | |
tell application "Finder" | |
set filename to name of aFile | |
set name of aFile to ((characters 4 thru -1 of filename) as string) --trim first 3 | |
--set name of whichFile to ((characters 1 thru -4 of filename) as string) --trim last 3 | |
end tell | |
end repeat |
This file contains 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
# Miscellaneous | |
*.class | |
*.log | |
*.pyc | |
*.swp | |
.DS_Store | |
.atom/ | |
.buildlog/ | |
.history | |
.svn/ |
This file contains 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
// Find Duplicates | |
// Kurt Kaiser, 2018 | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getActiveSheet(); | |
// Creates an array with data from a chosen column | |
function readData() { | |
var column = 2; | |
var lastRow = sheet.getLastRow(); |
This file contains 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:ui' as ui; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:rtjf/components/home_content.dart'; | |
class HomeScreen extends StatefulWidget { | |
static const String id = '/home_screen'; | |
@override | |
_HomeScreenState createState() => _HomeScreenState(); |
This file contains 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 'package:flutter/material.dart'; | |
import 'dart:async'; | |
import 'dart:typed_data'; | |
import 'dart:ui' as ui; | |
import 'package:image_picker_saver/image_picker_saver.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp(new MyApp()); |