Skip to content

Instantly share code, notes, and snippets.

View alamsyahh15's full-sized avatar
🖥️
Work From Home

Muhamad Alam Syah alamsyahh15

🖥️
Work From Home
View GitHub Profile
{
"content_body": " Center(\n child: Column(\n mainAxisSize: MainAxisSize.min,\n mainAxisAlignment: MainAxisAlignment.center,\n children: const <Widget>[\n Text('You have pushed the button this many times:'),\n Count(),\n ],\n ),\n )"
}
{
"lineItems": [
{
"variantId": "gid://shopify/ProductVariant/5691679703069",
"quantity": 1,
"customAttributes": [
{
"key": "Pengiriman non-langganan",
"value": "23/11/2022"
}
@alamsyahh15
alamsyahh15 / format_line_properties.json
Last active April 14, 2022 03:34
This format line properties - Product Subcription
{
"token": "edc12e2b25b81fb669d00b3da95cf463",
"note": null,
"attributes": {},
"original_total_price": 650000000,
"total_price": 650000000,
"total_discount": 0,
"total_weight": 5000,
"item_count": 9,
"items": [
public function sendNotification($arrToken = array(), $title = null, $body=null, $type=null, $data = null){
$response = Http::withHeaders(array(
'Authorization' => 'key=AAAAAihLhJI:APA91bGKKkamUmF14q3v4ZqJs3Kz6d2CKGsoTGoFL-6Al30yw0rz4VSzeQn4Gewtqt2q5GE9GHd9pFn3O1D_xG_ys8FUKjWn7V5SK4f563Tjp1xh10-CgQVFD-AqrQOPdyYKYGbF6uVU',
'Content-Type' => 'application/json'
))->post('https://fcm.googleapis.com/fcm/send',array(
'registration_ids' => $arrToken,
'notification' => array(
'title' => "{$title}",
'body' => "{$body}",
'sound' => 'default'
@alamsyahh15
alamsyahh15 / test
Last active November 22, 2021 06:54
void main() {
List<int> arrayData = [700,400,200,800,700,100,200,100,300];
List<int> backupData = [];
backupData.addAll(arrayData);
backupData.sort((a,b) => a.compareTo(b));
print("Output1 => $backupData");
Widget _createListView(){
return Flexible(
child: ListView.builder(
itemCount: dataList.length,
itemBuilder: (BuildContext context, int index){
return InkWell(
onTap : (){
/// Your action navigator push
},
child: Card(
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:images_picker/images_picker.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:qrscan/qrscan.dart' as scanner;
class QrScanPage extends StatefulWidget {
const QrScanPage({Key key}) : super(key: key);
// 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 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
import 'dart:io';
import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:path_provider/path_provider.dart';
class StampImage {
///Create watermark to an existing image file [image] and custom Widget as the watermark item.
///You can customize the position using alignment
import 'dart:developer';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
class SimpleBiayaSipema extends StatefulWidget {
@override
_SimpleBiayaSipemaState createState() => _SimpleBiayaSipemaState();
}