Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,313 changes: 1,313 additions & 0 deletions .idea/caches/deviceStreaming.xml

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions .idea/deviceManager.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

118 changes: 118 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mobile_app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission." />
<application
android:label="mobile_app"
android:name="${applicationName}"
Expand Down
6 changes: 4 additions & 2 deletions mobile_app/flutter_rust_bridge.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
rust_input: crate::api
rust_input: crate::api,crate::tantivy
rust_root: rust/
dart_output: lib/src/rust
dart_output: lib/src/rust
#rust_preamble:
# use std::path::PathBuf;
47 changes: 47 additions & 0 deletions mobile_app/lib/file.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import 'dart:io';
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:io';
import 'package:gap/gap.dart';
import 'package:mobile_app/utils.dart';

class FileApp extends StatelessWidget {
late List<FileSystemEntity> files = [];
FileApp({super.key, required this.files});

@override
Widget build(BuildContext context) {
//TODO:switch to class, so we can access more attributes outside of title

return SizedBox.shrink(
child: Column(
children: [
const ListTile(
leading: Text(
"files",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
)),
Column(
children: List.generate(files.length, (int index) {
String fileName = files[index].path.split("/").last;
String fileType = files[index].path.split("/").last.split(".").last;

Map<String, Icon> fileIcon = {"pdf": Icon(Icons.picture_as_pdf)};

return ListTile(
leading: fileIcon[fileType] ?? Icon(Icons.book),
trailing: Icon(Icons.chevron_right),
//TODO: style to make borders visible
onTap: () {
PdfScanner().openFile(files[index]);
//TODO: Handle click, popular search bar with text controller
},
title: Text(fileName), // Display results from search
);
})),
],
));
}
}
Loading