bangla_converter 0.0.1 copy "bangla_converter: ^0.0.1" to clipboard
bangla_converter: ^0.0.1 copied to clipboard

Flutter package for convert Bangla Number to English Number or vice versa.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:bangla_converter/bangla_converter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Bangla Convertor',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;
  String banglaPhoneNumber = "০১৭৩৩-৪৫২XXX";
  String englishPhoneNumber = "01733-452XXX";
  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text('Flutter Bangla Converter Page'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'Bangla To English Converter',
              style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
            ),
            Text(
              "Input: $banglaPhoneNumber",
            ),
            Text(
              "Output:  ${BanglaConverter.banToEng(banglaPhoneNumber)}",
            ),
            const SizedBox(height: 10),
            const Text(
              'English To Bangla Converter',
              style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
            ),
            Text(
              "Input: $englishPhoneNumber",
            ),
            Text(
              "Output:  ${BanglaConverter.engToBan(englishPhoneNumber)}",
            ),
            const SizedBox(height: 10),
            const Text(
              'You have pushed the button this\nmany times in Bangla Language:',
              style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
            ),
            Text(
              BanglaConverter.engToBan('$_counter'),
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
3
likes
140
pub points
52%
popularity
screenshot

Publisher

verified publisherpritom.me

Flutter package for convert Bangla Number to English Number or vice versa.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bangla_converter