2021-06-02 17:22:18 +07:00
|
|
|
import 'package:cubetiq/interfaces.dart';
|
2021-06-02 17:08:41 +07:00
|
|
|
import 'package:cubetiq/xlog.dart';
|
|
|
|
|
|
|
|
void main(List<String> args) {
|
|
|
|
XLog.error('My some error here {0} and me {1}', ['Sambo', 'Chea']);
|
|
|
|
|
|
|
|
XLog.debug('My some error here {0} and me {1}', ['Sambo', 'Chea']);
|
|
|
|
|
|
|
|
XLog.info('My some error here {0} and me {1}', ['Sambo', 'Chea']);
|
|
|
|
|
|
|
|
XLog.success('My some error here {0} and me {1}', ['Sambo', 'Chea']);
|
|
|
|
|
|
|
|
XLog.trace('My some error here {0} and me {1}', ['Sambo', 'Chea']);
|
|
|
|
|
|
|
|
XLog.warning('My some error here {0} and me {1}', ['Sambo', 'Chea']);
|
|
|
|
|
|
|
|
XLog.warning(null);
|
|
|
|
|
2021-06-02 17:16:54 +07:00
|
|
|
var person = Person(1, 'Sambo');
|
2021-06-02 17:08:41 +07:00
|
|
|
|
2021-06-02 17:16:54 +07:00
|
|
|
XLog.warning(person, [null, null]);
|
2021-06-02 17:08:41 +07:00
|
|
|
}
|
|
|
|
|
2021-06-02 17:16:54 +07:00
|
|
|
class Person implements ToJson {
|
2021-06-02 17:08:41 +07:00
|
|
|
final id;
|
|
|
|
final name;
|
|
|
|
|
|
|
|
Person(this.id, this.name);
|
|
|
|
|
2021-06-02 17:16:54 +07:00
|
|
|
@override
|
2021-06-02 17:08:41 +07:00
|
|
|
Map toJson() => {
|
|
|
|
'id': id,
|
|
|
|
'name': name,
|
|
|
|
};
|
|
|
|
}
|