Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - Chat - Bottom Mounted Sheet" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example_chat/lib/main_bottom_mounted_sheet.dart" />
<method v="2" />
</configuration>
</component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - Chat - Floating Editor (Configured)" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example_chat/lib/main_configured_floating_chat_page.dart" />
<method v="2" />
</configuration>
</component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - Chat - Floating Editor (Default)" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example_chat/lib/main_default_floating_chat_page.dart" />
<method v="2" />
</configuration>
</component>
6 changes: 0 additions & 6 deletions super_editor/.run/Example - Chat.run.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import 'package:flutter/material.dart';

/// A simulated chat conversation thread, which is simulated as a bottom-aligned
/// list of tiles.
class FakeChatThread extends StatelessWidget {
const FakeChatThread({super.key, this.scrollPadding = EdgeInsets.zero});

final EdgeInsets scrollPadding;

@override
Widget build(BuildContext context) {
return ListView.builder(
padding: scrollPadding,
reverse: true,
// ^ The list starts at the bottom and grows upward. This is how
// we should layout chat conversations where the most recent
// message appears at the bottom, and you want to retain the
// scroll offset near the newest messages, not the oldest.
itemBuilder: (context, index) {
if (index == 8) {
// Arbitrarily placed text field to test moving focus between a non-editor
// and the editor.
return TextField(
decoration: InputDecoration(
hintText: "Content text field...",
),
);
}

return Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: Material(
color: Colors.white.withValues(alpha: 0.5),
child: ListTile(
title: Text("This is item $index"),
subtitle: Text("This is a subtitle for $index"),
),
),
);
},
);
}
}
Loading
Loading