Skip to content

Instantly share code, notes, and snippets.

View Amitbhave's full-sized avatar
:octocat:
Working from home

AmitB Amitbhave

:octocat:
Working from home
View GitHub Profile
@Amitbhave
Amitbhave / home.dart
Created November 7, 2020 08:43
Flutter - Internationalization
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
class Home extends StatefulWidget {
@override
_HomeState createState() => _HomeState();
}
class _HomeState extends State<Home> {
bool isHindi = false;
@Amitbhave
Amitbhave / product_search.dart
Last active January 26, 2021 14:59
Flutter - Search using Barcode
import 'package:barcode_scan/barcode_scan.dart';
import 'package:barcode_search/models/product.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class ProductSearch extends SearchDelegate<String> {
Future _scanBarcode(BuildContext context) async {
String barcodeScanRes = await FlutterBarcodeScanner.scanBarcode(
"#ff6666",