Skip to content

Instantly share code, notes, and snippets.

View NichoAdhyatma's full-sized avatar
🏠
Working from home

Nicholaus Adhyatma NichoAdhyatma

🏠
Working from home
View GitHub Profile
@NichoAdhyatma
NichoAdhyatma / app_otp_field.dart
Created October 14, 2025 04:17
Flutter OTP Field Widget
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:otobee_user/core/core.dart';
class AppOTPField extends StatefulWidget {
const AppOTPField({
super.key,
this.length = 6,
this.onCompleted,
this.spacing = 8,
@NichoAdhyatma
NichoAdhyatma / AsyncContentWrapper.tsx
Last active May 19, 2025 07:52
Wrapper for async content like fetch data from API's , customize skeleton and empty content
import { Box } from '@mui/material'
import { AnimatePresence, motion } from 'framer-motion'
export const AsyncContentWrapper = ({
children,
isLoading,
skeleton,
emptyContent,
isEmpty,
skeletonCount
class AppTheme {
static _inputBorder({Color borderColor = AppPallete.borderColor}) =>
OutlineInputBorder(
borderSide: BorderSide(
color: borderColor,
width: 3,
),
borderRadius: BorderRadius.circular(10),
);
@NichoAdhyatma
NichoAdhyatma / HttpCustomtRequest.dart
Created November 2, 2023 15:11
Flutter Http Request Customize
import 'dart:async';
import '../models/api_response.dart';
import 'package:http/http.dart' as http;
import 'http_response_handler.dart';
abstract class HttpCustomRequest with HttpResponseHandlerMixin {
static const String jsonMimeType = 'application/json';
static const String bearerTokenPrefix = 'Bearer ';