Closed vanvixi closed 1 year ago
pubspec.yaml
path_provider: ^2.0.11
screenshot: ^1.2.3
gallery_saver: ^2.3.2
appinio_social_share: ^0.2.0
Code
import 'package:appinio_social_share/appinio_social_share.dart';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:screenshot/screenshot.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
final screenshotCtrl = ScreenshotController();
Future<void> _screenshot() async {
final pixelRatio = MediaQuery.of(context).devicePixelRatio;
final directoryPath = (await getTemporaryDirectory()).path;
final filePath = await screenshotCtrl.captureAndSave(
directoryPath,
fileName: 'trip_finished.jpg',
pixelRatio: pixelRatio,
);
if (filePath == null || !mounted) return;
AppinioSocialShare().shareToTwitter(
"message",
filePath: filePath,
);
}
@override
Widget build(BuildContext context) {
return Screenshot(
controller: screenshotCtrl,
child: Scaffold(
backgroundColor: Colors.green[100],
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _screenshot,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
),
);
}
}
Cannot edit content post
The text input area is obscured
RPReplay_Final1672383515.mov
I have same problem. On Android is working fine.
Hi, @sakura-sakai This problem seems to come from Twitter App. You can update the Twitter app version or maybe try with a bigger String.
Hi, @sakura-sakai This problem seems to come from Twitter App. You can update the Twitter app version or maybe try with a bigger String.
I tested with last version of Twitter and longer string, but the problem persist. If you put very long string, second row is half-visible.
Hi, @sakura-sakai This problem seems to come from Twitter App. You can update the Twitter app version or maybe try with a bigger String.
I tested with last version of Twitter and longer string, but the problem persist. If you put very long string, second row is half-visible.
Yes, I checked this and this problem does exist in the Twitter app. maybe we can report this issue to Twitter.
Hi, @sakura-sakai This problem seems to come from Twitter App. You can update the Twitter app version or maybe try with a bigger String.
I tested with last version of Twitter and longer string, but the problem persist. If you put very long string, second row is half-visible.
Yes, I checked this and this problem does exist in the Twitter app. maybe we can report this issue to Twitter.
Yes, perhaps we should do that.
Cannot edit content post
The text input area is obscured
https://user-images.githubusercontent.com/75975945/210044214-777f4e01-8f84-45d9-ba2f-dc3a8da765ba.mov