Skip to content

Instantly share code, notes, and snippets.

View rubywai's full-sized avatar
🏠

Wai Phyo Aung rubywai

🏠
View GitHub Profile
@phyowaikyaw-mobiledev
phyowaikyaw-mobiledev / assignment20.dart
Created April 6, 2026 12:12
Assignment 20 - Stream with Custom StreamTransformer
import 'dart:async';
Stream<dynamic> emit() async* {
yield 1;
yield 'hello';
yield 2;
yield 'world';
yield 3;
}
@phyowaikyaw-mobiledev
phyowaikyaw-mobiledev / assignment19.dart
Created April 6, 2026 12:09
Assignment 19 - Async Programming with Future.wait
import 'dart:async';
Future<int> getNumber1() async {
await Future.delayed(Duration(seconds: 3));
return 10;
}
Future<int> getNumber2() async {
await Future.delayed(Duration(seconds: 2));
return 20;
@phyowaikyaw-mobiledev
phyowaikyaw-mobiledev / assignment18.dart
Created April 6, 2026 12:00
Assignment 18 - Password Visibility Toggle
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
/*
* Copyright 2025 Kyriakos Georgiopoulos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Piinks
Piinks / main.dart
Last active January 18, 2024 21:24
Two Dimensional Grid in Flutter
// 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 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
@RageshAntony
RageshAntony / App.def
Last active May 2, 2024 10:28
Kotlin/Native C Interop - Usage in Kotlin class
headers = nuklear.h App.h nuklear_glfw_gl2.h nk_defines.h /usr/include/GLFW/glfw3.h /usr/include/GLFW/glfw3native.h
compiler-options = -framework OpenGl
package = glfw
linkerOpts.osx = -L/opt/local/lib -L/usr/local/lib -lglfw
linkerOpts.linux = -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu -lglfw -lGLU -lGL -lglut
linkerOpts.mingw = -lglfw
@eduardoflorence
eduardoflorence / main.dart
Created March 23, 2021 19:12
GetX - Sample BottomNavigationBar
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
debugShowCheckedModeBanner: false,
initialRoute: '/home',
defaultTransition: Transition.fade,
getPages: [
GetPage(
@adam-hurwitz
adam-hurwitz / AssistedInjectModule.kt
Last active October 22, 2021 13:05
Dagger 2 AssistedInject ViewModels
import com.squareup.inject.assisted.dagger2.AssistedModule
import dagger.Module
@AssistedModule
@Module(includes = [AssistedInject_AssistedInjectModule::class])
class AssistedInjectModule