|
| 1 | + |
| 2 | + |
| 3 | +# Flutter Barcodes library |
| 4 | + |
| 5 | +Flutter Barcode Generator package is a data visualization widget used to generate and display data in a machine-readable format. It provides a perfect approach to encoding input values using supported symbology types. |
| 6 | + |
| 7 | +**Disclaimer:** This is a commercial package. To use this package, you need to have either a Syncfusion<sup>®</sup> commercial license or [Free Syncfusion<sup>®</sup> Community license](https://www.syncfusion.com/products/communitylicense). For more details, please check the [LICENSE](https://github.com/syncfusion/flutter-examples/blob/master/LICENSE) file. |
| 8 | + |
| 9 | +## Table of contents |
| 10 | +- [Barcode Generator feature](#barcode-generator-feature) |
| 11 | +- [Get demo application](#get-demo-application) |
| 12 | +- [Useful links](#other-useful-links) |
| 13 | +- [Installation](#installation) |
| 14 | +- [Getting started](#getting-started) |
| 15 | + - [Add Barcode Generator to the widget tree](#add-barcode-generator-to-the-widget-tree) |
| 16 | + - [Add barcode symbology](#add-barcode-symbology) |
| 17 | + - [Show value to the barcode](#show-value-to-the-barcode) |
| 18 | +- [Support and feedback](#support-and-feedback) |
| 19 | +- [About Syncfusion<sup>®</sup>](#about-syncfusion) |
| 20 | + |
| 21 | +## Barcode Generator features |
| 22 | + |
| 23 | +* **One-dimensional barcodes** - Barcode Generator supports different one-dimensional barcode symbologies such as Code128, EAN8, EAN13, UPA-C, UPA-E, Code39, Code39 Extended, Code93 and Codabar. |
| 24 | + |
| 25 | + |
| 26 | +* **Two-dimensional barcode** - Barcode Generator supports popular QR Code and Data Matrix. |
| 27 | + |
| 28 | + |
| 29 | +* **Barcode customization** - Customize the visual appearance of barcodes using the backgroundColor and barColor properties, and adjust the size of smallest line or dot of the code using the module property. |
| 30 | + |
| 31 | +* **Text customization** -Configure to display the barcode value and customize the position and style of the barcode text. |
| 32 | + |
| 33 | +## Get demo application |
| 34 | + |
| 35 | +Explore the full capabilities of our Flutter widgets on your device by installing our sample browser applications from the following app stores and view samples code in GitHub. |
| 36 | + |
| 37 | +<p align="center"> |
| 38 | + <a href="https://play.google.com/store/apps/details?id=com.syncfusion.flutter.examples"><img src="https://cdn.syncfusion.com/content/images/FTControl/google-play.png"/></a> |
| 39 | + <a href="https://github.com/syncfusion/flutter-examples"><img src="https://cdn.syncfusion.com/content/images/FTControl/GitHub.png"/></a> |
| 40 | + <a href="https://flutter.syncfusion.com"><img src="https://cdn.syncfusion.com/content/images/FTControl/web_sample_browser.png"/></a> |
| 41 | +</p> |
| 42 | + |
| 43 | +## Other useful links |
| 44 | +Take a look at the following to learn more about Syncfusion<sup>®</sup> Flutter guages: |
| 45 | + |
| 46 | +* [Syncfusion<sup>®</sup> Flutter Barcode product page](https://www.syncfusion.com/flutter-widgets) |
| 47 | +* [User guide documentation](https://help.syncfusion.com/flutter/introduction/overview) |
| 48 | +* [Knowledge base](https://www.syncfusion.com/kb) |
| 49 | + |
| 50 | +## Installation |
| 51 | + |
| 52 | +Install the latest version from [pub](https://pub.dartlang.org/packages/syncfusion_flutter_barcodes#-installing-tab-). |
| 53 | + |
| 54 | +## Getting started |
| 55 | + |
| 56 | +Import the following package. |
| 57 | + |
| 58 | +```dart |
| 59 | +import 'package:syncfusion_flutter_barcodes/barcodes.dart'; |
| 60 | +``` |
| 61 | +### Add Barcode Generator to the widget tree |
| 62 | + |
| 63 | +Add the Barcode Generator widget as a child of any widget. Here, the widget is added as a child of the container widget and the height to the container is specified (otherwise it will take full container height) |
| 64 | + |
| 65 | +```dart |
| 66 | + @override |
| 67 | + Widget build(BuildContext context) { |
| 68 | + return MaterialApp( |
| 69 | + home: Scaffold( |
| 70 | + body: Center( |
| 71 | + child: Container( |
| 72 | + height: 200, |
| 73 | + child: SfBarcodeGenerator(value: 'www.syncfusion.com'), |
| 74 | + ))), |
| 75 | + ); |
| 76 | + } |
| 77 | +``` |
| 78 | +## Add barcode symbology |
| 79 | + |
| 80 | +Set the required symbology type to the barcode generator based on input value by initializing the **symbology** property. In the following code snippet, the QR code is set as the barcode symbology. |
| 81 | + |
| 82 | +```dart |
| 83 | + @override |
| 84 | + Widget build(BuildContext context) { |
| 85 | + return MaterialApp( |
| 86 | + home: Scaffold( |
| 87 | + body: Center( |
| 88 | + child: Container( |
| 89 | + height: 200, |
| 90 | + child: SfBarcodeGenerator( |
| 91 | + value: 'www.syncfusion.com', |
| 92 | + symbology: QRCode(), |
| 93 | + ), |
| 94 | + ))), |
| 95 | + ); |
| 96 | + } |
| 97 | +``` |
| 98 | +## Show value of the barcode |
| 99 | + |
| 100 | +input values can be displayed by enabling the **showValue** property of barcodes. |
| 101 | + |
| 102 | +```dart |
| 103 | + @override |
| 104 | + @override |
| 105 | + Widget build(BuildContext context) { |
| 106 | + return MaterialApp( |
| 107 | + home: Scaffold( |
| 108 | + body: Center( |
| 109 | + child: Container( |
| 110 | + height: 200, |
| 111 | + child: SfBarcodeGenerator( |
| 112 | + value: 'www.syncfusion.com', |
| 113 | + symbology: QRCode(), |
| 114 | + showValue: true, |
| 115 | + ), |
| 116 | + ))), |
| 117 | + ); |
| 118 | + } |
| 119 | +``` |
| 120 | + |
| 121 | +The following screenshot illustrates the result of the previous code sample. |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | +### Support and feedback |
| 126 | + |
| 127 | +* For any other queries, reach our [Syncfusion<sup>®</sup> support team](https://support.syncfusion.com/support/tickets/create) or post the queries through the [Community forums](https://www.syncfusion.com/forums) and submit a feature request or a bug through our [Feedback portal](https://www.syncfusion.com/feedback/flutter). |
| 128 | +* To renew the subscription, click [renew](https://www.syncfusion.com/sales/products) or contact our sales team at sales@syncfusion.com | Toll Free: 1-888-9 DOTNET. |
| 129 | + |
| 130 | +### About Syncfusion<sup>®</sup> |
| 131 | + |
| 132 | +Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion<sup>®</sup> has more than 20,000 customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies. |
| 133 | + |
| 134 | +Today we provide 1,000+ controls and frameworks for web ([ASP.NET Core](https://www.syncfusion.com/aspnet-core-ui-controls), [ASP.NET MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls), [ASP.NET WebForms](https://www.syncfusion.com/jquery/aspnet-web-forms-ui-controls), [JavaScript](https://www.syncfusion.com/javascript-ui-controls), [Angular](https://www.syncfusion.com/angular-ui-components), [React](https://www.syncfusion.com/react-ui-components), [Vue](https://www.syncfusion.com/vue-ui-components), [Flutter](https://www.syncfusion.com/flutter-widgets), and [Blazor](https://www.syncfusion.com/blazor-components)), mobile ([Xamarin](https://www.syncfusion.com/xamarin-ui-controls), [.NET MAUI](https://www.syncfusion.com/maui-controls), [Flutter](https://www.syncfusion.com/flutter-widgets), [UWP](https://www.syncfusion.com/uwp-ui-controls), and [JavaScript](https://www.syncfusion.com/javascript-ui-controls)), and desktop development ([Flutter](https://www.syncfusion.com/flutter-widgets), [WinForms](https://www.syncfusion.com/winforms-ui-controls), [WPF](https://www.syncfusion.com/wpf-ui-controls), [UWP](https://www.syncfusion.com/uwp-ui-controls), [.NET MAUI](https://www.syncfusion.com/maui-controls), and [WinUI](https://www.syncfusion.com/winui-controls)). We provide ready-to- deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software. |
0 commit comments