Skip to content

Instantly share code, notes, and snippets.

View wisnuwiry's full-sized avatar
Make it faster

Wisnu G Saputra wisnuwiry

Make it faster
View GitHub Profile
@wisnuwiry
wisnuwiry / nv-chad.md
Last active November 18, 2024 21:25
A basic keyboard shortcut for the vim/nvim editor.

General

  1. Show Documentation: K
  2. Go to Code Action: leader + ca
  3. Go to Definition: gd
  4. Comment: leader + /
  5. Toggle Line Number: leader + n
  6. New Buffer: leader + b
  7. Relative number: leader + rn
  8. Copy whole file: Ctrl + c
@wisnuwiry
wisnuwiry / vs_code_configuration_dart.json
Created August 18, 2022 01:15
A powerful configuration that keeps productivity and code neat.
"[dart]": {
// Automatically format code on save and during typing of certain characters
// (like `;` and `}`).
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
// Draw a guide line at 80 characters, where Dart's formatting will wrap code.
@wisnuwiry
wisnuwiry / indonesian_independence_day.dart
Created August 17, 2022 14:04
An illustration depicting independence day with Flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Independence Day',
debugShowCheckedModeBanner: false,
@wisnuwiry
wisnuwiry / main.dart
Created August 17, 2022 13:55
Counter example
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Independence Day',
debugShowCheckedModeBanner: false,
@wisnuwiry
wisnuwiry / main.dart
Created February 11, 2022 03:54
Flutter Example Select Date Range Picker with showDateRangePicker
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@wisnuwiry
wisnuwiry / main.dart
Created February 3, 2022 12:23
Example of Flutter/Dart Dynamic JSON Key Parsing
const rawData = {
'status': 'Success',
'data': {
'2022-10-1': true,
'2022-10-2': false,
'2022-10-3': true,
'2022-10-4': false,
}
};
@wisnuwiry
wisnuwiry / main.dart
Created November 10, 2021 05:26
Flutter Example Input Auto Uppercase
import 'package:flutter/services.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
@wisnuwiry
wisnuwiry / main.dart
Created April 5, 2021 01:24
Flutter Auto Collapse ExpansionTile
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
import 'dart:async';
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:meta/meta.dart';
import 'package:rxdart/rxdart.dart';
import '../../data/data.dart';
part 'product_bycategory_event.dart';
@wisnuwiry
wisnuwiry / example_var.dart
Created November 26, 2019 14:00
Contoh penerapan variabel pada Dart
void main() {
var p = 12;
print(p);
var s = "Hello";
print(s);
}