Skip to content

Instantly share code, notes, and snippets.

View noga-dev's full-sized avatar
🙊
Apes Together Strong

Agon Noga noga-dev

🙊
Apes Together Strong
View GitHub Profile
@noga-dev
noga-dev / blockman.dart
Created November 9, 2021 14:24
test code for blockman
// Want to support my work 🤝? https://buymeacoffee.com/vandad
import 'package:flutter/material.dart';
class ListItem {
const ListItem();
factory ListItem.emptyTile() => EmptyTile();
factory ListItem.tile(
String title,
String subTitle,
@noga-dev
noga-dev / commitCount.dart
Last active June 29, 2021 19:38 — forked from codsane/commitCount.py
Simplest way to get commit count of a GitHub repo using the API
import 'dart:html';
void main() async {
print(await getCommits(repo: 'river_pod', owner: 'rrousselGit'));
}
Future<String> getCommits({required String repo, required String owner}) async => RegExp(r'(\d+)')
.allMatches((await HttpRequest.request(
'https://api.github.com/repos/$owner/$repo/commits?per_page=1'))
.responseHeaders['link']!)
@noga-dev
noga-dev / main.dart
Last active June 13, 2021 15:51
Container vs. SizedBox vs. DecoratedBox
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:statsfl/statsfl.dart';
void main() {
runApp(
StatsFl(
isEnabled: true,
showText: true,
sampleTime: 0.05,
I/flutter ( 7824): JitsiMeetingOptions: JitsiMeetingOptions{room: plugintestroom, serverURL: https://meet.jitsi.si, subject: My Plugin Test Meeting, token: null, audioMuted: true, audioOnly: true, videoMuted: true, userDisplayName: Plugin Test User, userEmail: fake@email.com}
D/JITSI_MEET_PLUGIN( 7824): method: joinMeeting
D/JITSI_MEET_PLUGIN( 7824): arguments: {videoMuted=true, subject=My Plugin Test Meeting, serverURL=https://meet.jitsi.si, audioOnly=true, audioMuted=true, userDisplayName=Plugin Test User, userEmail=fake@email.com, room=plugintestroom, token=null}
D/JITSI_MEET_PLUGIN( 7824): Joining Room: plugintestroom
W/ActivityThread( 7824): handleWindowVisibility: no activity for token android.os.BinderProxy@1763f06
D/ReactNative( 7824): ReactInstanceManager.createReactContextInBackground()
D/ReactNative( 7824): ReactInstanceManager.attachRootViewToInstance()
I/JitsiMeetSDK( 7824): AudioMode Update audio route for mode: 0
I/JitsiMeetSDK( 7824): AudioMode Updating audio device list
I/JitsiMeetSDK( 7824):
@noga-dev
noga-dev / main.dart
Created March 21, 2020 23:25
CupertinoPicker example
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: CupPickerDemo(),
),
);
import 'package:flutter/material.dart';
final text = '''
Call me Ishmael. Some years ago—never mind how long precisely—having
little or no money in my purse, and nothing particular to interest me
on shore, I thought I would sail about a little and see the watery part
of the world. It is a way I have of driving off the spleen and
regulating the circulation. Whenever I find myself growing grim about
the mouth; whenever it is a damp, drizzly November in my soul; whenever
I find myself involuntarily pausing before coffin warehouses, and
import 'package:flutter/material.dart';
TextStyle posRes = TextStyle(color: Colors.white, backgroundColor: Colors.red),
negRes = TextStyle(color: Colors.black, backgroundColor: Colors.white);
String search;
final text = '''
Call me Ishmael. Some years ago—never mind how long precisely—having
little or no money in my purse, and nothing particular to interest me
void main() => runApp(
StatefulBuilder(builder: (context, setState) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
title: TextField(
style: TextStyle(fontSize: 22),
decoration: InputDecoration(hintText: "Search"),
onChanged: (t) {
Before:
<local:Welcome x:Name="WelcomeUserControl" HorizontalAlignment="Center" VerticalAlignment="Center" ImportButtonClick="WelcomeUserControl_ImportButtonClick" NewButtonClick="WelcomeUserControl_NewButtonClick" OpenButtonClick="WelcomeUserControl_OpenButtonClick" OpenRecentFileButtonClick="WelcomeUserControl_OpenRecentFileButtonClick"/>
After:
<local:Welcome
x:Name="WelcomeUserControl"
HorizontalAlignment="Center"