Skip to content

Instantly share code, notes, and snippets.

View happyharis's full-sized avatar
🎯
Focusing

Haris Samingan happyharis

🎯
Focusing
View GitHub Profile
@happyharis
happyharis / notesSlice.js
Created July 21, 2022 11:36
PCMOB 6 Setup: store and reducer
import { createSlice } from "@reduxjs/toolkit";
const initialState = [
{ id: "1", title: "First Post!", content: "Hello!" },
{ id: "2", title: "Second Post", content: "More text" },
];
const notesSlice = createSlice({
name: "notes",
initialState,
@happyharis
happyharis / HomeStack.js
Last active July 21, 2022 08:53
PCMOB6 HomeStack.js
import { FontAwesome } from "@expo/vector-icons";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import React from "react";
import { NOTES_SCREEN, PROFILE_SCREEN } from "../constants";
import NotesScreenHome from "../screens/NotesScreenHome";
import ProfileScreen from "../screens/ProfileScreen";
const BottomTab = createBottomTabNavigator();
export default function HomeStack() {
@happyharis
happyharis / main.dart
Created April 15, 2020 23:40
Parallax Effect in Flutter Web
import 'package:flutter/material.dart';
// Import transparent_image in pubspec.yaml file
import 'package:transparent_image/transparent_image.dart';
void main() {
runApp(MyPortfolio());
}
class MyPortfolio extends StatelessWidget {
@override
@happyharis
happyharis / package.json
Created February 11, 2022 09:31
pcmob5 updated packages for blog react native app
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
@happyharis
happyharis / main.dart
Created May 16, 2021 00:55
Learn Flutter Workshop - Todo App v2
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@happyharis
happyharis / firebase_storage.dart
Created January 10, 2020 05:07
Flutter web implemantion of firebase storage
import 'dart:async';
import 'dart:html';
import 'package:flutter/material.dart';
import 'package:firebase/firebase.dart' as fb;
import 'package:firebase/firestore.dart' as fs;
import 'package:linktree_demo_clone/linktree.dart';
class Settings extends StatefulWidget {
@override
@happyharis
happyharis / main.dart
Created April 7, 2021 04:42
Hyperlink widget in Flutter web
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@happyharis
happyharis / index.html
Created April 28, 2020 05:34
Flutter web Google Sign In
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="A new Flutter project." />
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@happyharis
happyharis / main.dart
Created January 4, 2021 04:41
flutter workshop 2021 source code
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@happyharis
happyharis / main.dart
Created January 3, 2021 23:42
humming bird logo
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override