Skip to content

Instantly share code, notes, and snippets.

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

Parth Dave parthdave93

🏠
Working from home
View GitHub Profile
@parthdave93
parthdave93 / platform_svg.dart
Created July 1, 2020 18:38
Flutter Web platform dependent code for Flutter_SVG plugin
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class PlatformSvg {
static Widget asset(String assetName,
{double width,
double height,
BoxFit fit = BoxFit.contain,
Color color,
alignment = Alignment.center,
@parthdave93
parthdave93 / api_call.dart
Created July 1, 2020 19:11
Flutter Web file pick and upload via multipart full example
//example function body
Map<String, dynamic> fields = {
"data": filedValue,
};
var request = http.MultipartRequest(
"POST", Uri.parse('url'),
);
request.files.add(