1
1
import 'dart:convert' ;
2
- import 'dart:io' ;
3
2
4
3
import 'package:flutter/gestures.dart' ;
5
4
import 'package:flutter/material.dart' ;
@@ -15,7 +14,6 @@ import 'package:get_10101/features/trade/domain/trade_values.dart';
15
14
import 'package:get_10101/features/trade/submit_order_change_notifier.dart' ;
16
15
import 'package:provider/provider.dart' ;
17
16
import 'package:share_plus/share_plus.dart' ;
18
- import 'package:social_share/social_share.dart' ;
19
17
import 'package:url_launcher/url_launcher.dart' ;
20
18
21
19
class TradeDialog extends StatelessWidget {
@@ -83,7 +81,7 @@ Widget createSubmitWidget(
83
81
SizedBox (
84
82
width: 200 ,
85
83
child: Wrap (
86
- runSpacing: 10 ,
84
+ runSpacing: 5 ,
87
85
children: [
88
86
pendingOrder.positionAction == PositionAction .close
89
87
? ValueDataRow (type: ValueType .amount, value: pendingOrder.pnl, label: pnlText)
@@ -116,7 +114,7 @@ Widget createSubmitWidget(
116
114
// Only display "share on twitter" when order is filled
117
115
if (pendingOrder.state == PendingOrderState .orderFilled) {
118
116
children.add (Padding (
119
- padding: const EdgeInsets .only (top: 20 , left: 10 , right: 10 , bottom : 5 ),
117
+ padding: const EdgeInsets .only (top: 10 , left: 10 , right: 10 ),
120
118
child: ElevatedButton (
121
119
onPressed: () async {
122
120
showDialog (
@@ -150,18 +148,6 @@ Widget createSubmitWidget(
150
148
);
151
149
}
152
150
153
- Future <void > shareTweet (PositionAction action) async {
154
- String actionStr = action == PositionAction .open ? "opened" : "closed" ;
155
- String shareText =
156
- "Just $actionStr a #selfcustodial position using #DLC with @get10101 🚀. The future of decentralised finance starts now! #Bitcoin" ;
157
-
158
- if (Platform .isAndroid || Platform .isIOS) {
159
- await SocialShare .shareTwitter (shareText);
160
- } else {
161
- await Share .share (shareText);
162
- }
163
- }
164
-
165
151
class ClickableHelpText extends StatelessWidget {
166
152
const ClickableHelpText ({super .key});
167
153
0 commit comments