This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const router = express.Router(); | |
const upload = require('../services/uploder_service'); | |
const singleUpload = upload.single('image'); | |
router.post('/image-upload', function(req, res) { | |
singleUpload(req, res, function(err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def localProperties = new Properties() | |
def localPropertiesFile = rootProject.file('local.properties') | |
if (localPropertiesFile.exists()) { | |
localPropertiesFile.withReader('UTF-8') { reader -> | |
localProperties.load(reader) | |
} | |
} | |
def keystorePropertiesFile = rootProject.file("keystore.properties") //signing key | |
def keystoreProperties = new Properties() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const AWS = require('aws-sdk'); | |
AWS.config.update({ | |
secretAccessKey: process.env.secretAccessKey, | |
accessKeyId: process.env.accessKeyId, | |
region: process.env.region | |
}); | |
const sendSms = function (event, context, callback) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```dart | |
import 'package:mime/mime.dart'; //add mime to pubspec.yaml | |
import 'package:uuid/uuid.dart'; //add uuid to pubspec.yaml | |
import 'package:firebase_storage/firebase_storage.dart'; //add firebase storage to pubspec.yaml | |
import 'package:path/path.dart'; //add path to pubspec.yaml | |
final firebaseStorage = FirebaseStorage.instance; | |
Future uploadFile({required File file}) async { | |
const uuid = Uuid(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```dart | |
import 'package:firebase_auth/firebase_auth.dart'; | |
abstract class AuthController { | |
Future<bool> loginUser(String email, String password); | |
Future<bool> logout(); | |
} | |
class AuthControllerImpl implements AuthController { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release assets | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
release-asset: | |
name: Release (foss) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class LayoutBuilderExample extends StatelessWidget { | |
const LayoutBuilderExample({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(title: const Text('LayoutBuilder Example')), | |
body: LayoutBuilder(builder: (context, constraints) { |