Skip to content

Instantly share code, notes, and snippets.

Avatar
💜
flutter

joseph Omer JoDeveloper

💜
flutter
View GitHub Profile
View app-buid.gradlel
lintOptions {
disable 'InvalidPackage'
}
aaptOptions {
cruncherEnabled = false
}
defaultConfig {
applicationId "com.jodeveloper.missing"
View gist:0905e8de1c97e2305c8a54fae6b1fc96
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
android.enableUnitTestBinaryResources=true
View create new laravel app
#create new laravel project
function nlp() {
DIR="$HOME/projects"
if [ -d "$DIR/$1" ]; then
echo "Directory $DIR/$1 exists already."
return 1
fi
View gist:0dc2c53475ea740c26e7871860bdbf62
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'dart:math' as math;
class SlidingCardsView extends StatefulWidget {
@override
_SlidingCardsViewState createState() => _SlidingCardsViewState();
}
class _SlidingCardsViewState extends State<SlidingCardsView> {
View gist:a31404eb392b84e5dc14015ab9d11e5d
import 'package:flutter/material.dart';
/// 简单列表项
class SampleListItem extends StatelessWidget {
/// 方向
final Axis direction;
/// 宽度
final double width;
View list_item.dart
import 'package:flutter/material.dart';
/// 列表项
class ListItem extends StatefulWidget {
// 点击事件
final VoidCallback onPressed;
// 图标
final Widget icon;
// 标题
final String title;
View user_profile.dart
import 'package:example/widget/list_item.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:url_launcher/url_launcher.dart';
/// 个人中心页面
class UserProfilePage extends StatefulWidget {
@override
_UserProfilePageState createState() => _UserProfilePageState();
View php-event-listener-example.php
<?php
class Event {
private static $events = [];
public static function listen($name, $callback) {
self::$events[$name][] = $callback;
}
public static function trigger($name, $argument = null) {
foreach (self::$events[$name] as $event => $callback) {
@JoDeveloper
JoDeveloper / Accordion.vue
Created Oct 29, 2019 — forked from laracasts/Accordion.vue
vuecasts.com - episode 41 source code.
View Accordion.vue
<template>
<div>
<accordion-item
v-for="(item, index) in items"
:title="item[titleName]"
:body="item[bodyName]"
:key="index"
:is-open="activeItemIndex == index"
@toggled="onToggle"
></accordion-item>
View launch_screen.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- The android:opacity=”opaque” line — this is critical in preventing a flash of black as your theme transitions. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- The background color, preferably the same as your normal theme -->
<item android:drawable="@android:color/white"/>
<!-- Your product logo - 144dp color version of your app icon -->
<item>