Skip to main content

dot_xim_parser 0.0.2 copy "dot_xim_parser: ^0.0.2" to clipboard
dot_xim_parser: ^0.0.2 copied to clipboard

A small Dart/Flutter package to parse .xim files into structured Maps.

example/lib/main.dart

import 'dart:convert';

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

void main() => runApp(const MyApp());

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

  static const String ximContent = '''
root {
  name: "Example App"
  enabled: true
  count: 42
  nested {
    value: "hello from example"
  }
}
''';

  @override
  Widget build(BuildContext context) {
    final parsed = XimParser.parse(ximContent);
    final pretty = const JsonEncoder.withIndent('  ').convert(parsed);

    return MaterialApp(
      title: 'dot_xim_parser example',
      home: Scaffold(
        appBar: AppBar(title: const Text('dot_xim_parser example')),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: SingleChildScrollView(
            child: SelectableText(pretty),
          ),
        ),
      ),
    );
  }
}
0
likes
145
points
30
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A small Dart/Flutter package to parse .xim files into structured Maps.

Homepage

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dot_xim_parser