dot_xim_parser 0.0.2
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),
),
),
),
);
}
}