Skip to content

Instantly share code, notes, and snippets.

import 'dart:convert';
void main() {
// sample JSON
String _userJsonInitial = '''{
"name" : "Mock",
"age" : 20,
"subscribed" : true}''';
// Define the function that will return the future
@thenbe
thenbe / main.dart
Created April 17, 2021 10:13
How to Access a Variable that is Associated with other Widget in Flutter?
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@thenbe
thenbe / main.dart
Created April 18, 2021 01:27
citations list
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@thenbe
thenbe / vnr
Created November 23, 2022 20:19
Restore original neovim filename substitution behavior when using vscode-neovim extension
#!/bin/bash
# Usage: vnr <your-command>
# Example: vnr node % --my-arg
# Description: This script removes every occurrence of
# "__vscode_neovim__-file://", then runs the command.
# The pattern to replace