diagnostic_trouble_codes 1.0.1 copy "diagnostic_trouble_codes: ^1.0.1" to clipboard
diagnostic_trouble_codes: ^1.0.1 copied to clipboard

A Flutter package providing fast, offline access to a comprehensive OBD-II Diagnostic Trouble Code (DTC) SQLite database with generic SAE J2012 and manufacturer-specific definitions.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'ui_constants.dart';
import 'sections/lookup.dart';
import 'sections/search.dart';
import 'sections/batch.dart';
import 'sections/statistics.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        fontFamily: 'Poppins',
        useMaterial3: true,
        // Sets the default color for all Text widgets
        textTheme: Theme.of(context).textTheme.apply(
          fontFamily: 'Poppins',
          bodyColor: iconAndTextColor,
          displayColor: iconAndTextColor,
        ),

        // Sets the default color for all Icon widgets
        iconTheme: const IconThemeData(color: iconAndTextColor),

        // Ensures icons in AppBars/Buttons follow suit
        primaryIconTheme: const IconThemeData(color: iconAndTextColor),
      ),
      debugShowCheckedModeBanner: false,
      home: Home(),
    );
  }
}

/// Main screen displaying all example sections.
class Home extends StatelessWidget {
  const Home({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: applicationBackground,
      appBar: AppBar(
        backgroundColor: actionGreen,
        title: const Text(
          'Diagnostic Trouble Codes Demo',
          style: TextStyle(color: applicationBackground),
        ),
      ),
      body: Padding(
        padding: const EdgeInsets.all(20),
        child: ListView(
          children: const [
            LookupSection(),
            SizedBox(height: 20),
            SearchSection(),
            SizedBox(height: 20),
            BatchSection(),
            SizedBox(height: 20),
            StatisticsSection(),
          ],
        ),
      ),
    );
  }
}
0
likes
0
points
197
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package providing fast, offline access to a comprehensive OBD-II Diagnostic Trouble Code (DTC) SQLite database with generic SAE J2012 and manufacturer-specific definitions.

Repository (GitHub)
View/report issues

Topics

#automotive #dtc #sqlite #offline-database #flutter-plugin

License

unknown (license)

Dependencies

flutter, path, path_provider, sqflite

More

Packages that depend on diagnostic_trouble_codes